sys.dm_exec_query_stats interaction with recompilation
- by Sam Saffron
We use sys.dm_exec_query_stats to track down slow queries and queries that are IO offenders.
This works great, we get a lot of very insightful stats. It is clear this is not as accurate as running a profiler trace, as you have no idea when SQL Server will decide to chuck out a an execution plan.
We have quite a few queries where the wrong…