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? 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.
DBCC FREEPROCCACHEis almost never the right answer. A bad band-aid. If you are looking to clear stored procedures/triggers, you can callsp_recompile 'yourTableName'to mark all procs/triggers for recompile that haveyourTableNamein the definition. – Thomas Stringer Apr 12 '12 at 1:00