Format SQL & Entity Framework — making EF SQL easily readable
I have the misfortune of trying to read an EF query. It would be extremely helpful if the «Format SQL» function in SQL Prompt could greatly reduce the verbosity and make the massively nested queries much, much easier to read.
This is what I am doing by hand:
• Replacing names like 'Extent6' with letters of the alphabet. I will go back later and replace these letters with more helpful names. Because the aliases of the table-valued objects are so long, so is there so much more text to plough through;
• Removing aliases from columns whose names are identical. Again verbosity. Aliases that have the same name as the columns are pointless.
• Nesting subqueries with CR/LFs and tabs to make the massive of block of EF text readable;
What would also be helpful and it shouldn't be too hard, would be to list in a comments section what the plan handles are. This would allow those who have SQL Monitor to match the EF query with the entry in SQL Monitor