patternMinor
SQL Azure dm_exec_query_stats clearing?
Viewed 0 times
sqlazureclearingdm_exec_query_stats
Problem
I'm doing a lot of work with SQL Azure at the moment, trying to improve performance of a web app. I am using the dm_exec_query_stats view to look for poor performing queries.
Does anyone know a way to clear the query stats in Azure?
Does anyone know a way to clear the query stats in Azure?
DBCC FREEPROCCACHE isn't supported. I can use sp_recompile 'procedure' to clear stored procedures/functions etc, but the site uses some LINQ-generated queries which can't be cleared in this manner.Solution
Old question I know, but if anyone is still looking for one potential workaround...
I wrote a small utility (shared on my blog) that makes life easier when working with this DMV. This utility takes a baseline of the query stats to act as an effective zero.
The utility then queries the DMV repeatedly and works out the changes to show what has executed over the time since the last call into the DMV.
For more details, see:
http://cbailiss.wordpress.com/2014/10/01/free-tool-sql-workload-profiler-for-on-premise-and-azure-sql-db/
I wrote a small utility (shared on my blog) that makes life easier when working with this DMV. This utility takes a baseline of the query stats to act as an effective zero.
The utility then queries the DMV repeatedly and works out the changes to show what has executed over the time since the last call into the DMV.
For more details, see:
http://cbailiss.wordpress.com/2014/10/01/free-tool-sql-workload-profiler-for-on-premise-and-azure-sql-db/
Context
StackExchange Database Administrators Q#9114, answer score: 2
Revisions (0)
No revisions yet.