Provide a LINQ Query Tuner
Something to identify common patterns of misuse or inefficiency in LINQ queries, and suggest alternatives
Giorgi Dalakishvili commented
I build a query execution plan visualizer which allows you to view query execution plan, missing indexes and create those missing indexes from inside LINQPad:
chilversc . commented
Could also support Uberprof http://www.hibernatingrhinos.com/products/uberprof by auto-loading and initializing if it's present?
Uberprof has a great UI and alerts, plus reformats the SQL to be readable.
I really like the idea to provide some performance metrics for LINQ queries, but as I use both LINQ to SQL, crm 2011 and XRM connections I can see a potential difficulty as there are different performance bottlenecks in each, and functionality is omitted altogether in some cases.
Elliot Boney commented
This is a great idea. I currently open the sql in SSMS and use SSMS tools to try and give me hints on how the generated SQL could be improved. If this could be shown in the LINQ beforehand it would be a huge benefit.
Actually, I like this idea. If not necessarily code-modifying, at least some type of "hints" that could be provided in order to see potential optimizations. For example, a query which uses an 'orderby' and then performs additional filtering in the pipeline.
Suggesting something like "filtering before ordering optimization" would be very handy. (Now making the actually code change would be superb.) Preferrably this would analyze the optimizations you highlight in your book.