This statement is 2100 characters for the same equivalent as 200 characters. WTF!!! I LOVE ME SOME ORM GENERATED SQL CODE!!! Said no DBA ever!
@SQLPoolBoy When I see a poorly performing SQL statement that starts with "SELECT [UnionAll10].[C2] AS [C1]" and is truncated in the plan, I know I'm in for a rough day.
@SQLPoolBoy SQL generated based on some other model can be so doggone opaque. And coming from some sources, there is so little opportuntity to intervene with query hints. Query store hints can't get here fast enough for that stuff :-)
@SQLPoolBoy Looking at ORM generated T-SQL isn't fun and it's only part of the issue. Give me bad T-SQL in a stored proc written by an actual human any day. You lose a LOT by not using stored procs.
@SQLPoolBoy … and so intuitively readable and editable too !! </sarcasm>