Otis wrote:
Ah
You could try SSMS' profiler. It will show you the exact query, with parameter declarations and sp_executesql. (Tools -> Sql profiler). You then have to fine tune it (using the filters) a bit so it'll filter out all nonsense except queries from your app.
You could copy/paste these..
Though if a query is slow overall, please check in orm profiler if the '.net time' is huge. That would mean materialization takes a long time.
Also, take into account that ssms keeps the connection open. So executing a query 2 times in the same tab means the result of the previous execution is still available in the cache of that connection and the results will likely be fast.
Wasn't MS planning to remove the SQL Profiler at some point?
I thought of it, but it does put some performance penalty on db and my target db is Azure SQL
I do have a plan B to try to query for all execution plans and try to find that specific query, but being able to fetch the query from LinqPad + tracing of LLBLGen just feels more natural and convenient for this kind of troubleshooting
Also I think it might be beneficial to be ableto easily track how even new queries are performing while working on them in conjunction with, say, Plan Explorer.
Thank you!