Comments on: HOW TO: Find When SQL Server Wait Stats Were Last Cleared https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/ Thomas LaRock is an author, speaker, data expert, and SQLRockstar. He helps people connect, learn, and share. Along the way he solves data problems, too. Fri, 10 Jul 2015 19:45:00 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: ThomasLaRock https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/#comment-12944 Fri, 10 Jul 2015 19:45:00 +0000 http://thomaslarock.com/?p=11989#comment-12944 In reply to ??? ??????.

Could you give me an example of how query statistics would be reset outside of the three scenarios above?

Are you asking for when stats were last updated on a table? Is there a particular command you are using to clear query statistics other than DBCC FREEPROCCACHE? Are you resetting the statistics for one query, or for all of them?

You question is rather ambiguous to me, I apologize for not knowing what it is you are doing to reset query statistics. Once I know more about what you are doing, then I can go about trying to help you find a solution.

Thanks

]]>
By: ??? ?????? https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/#comment-12943 Thu, 09 Jul 2015 03:41:00 +0000 http://thomaslarock.com/?p=11989#comment-12943 In reply to ThomasLaRock.

Thomas, in the above article you showed how to get when was the last time the Server restarted, the SQL Server restarted, and Waits statistics cleared … what I’m asking about is how to get WHEN was the last time the QUERY STATISTICS cleared? not how … what I want is WHEN

]]>
By: ThomasLaRock https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/#comment-12942 Wed, 08 Jul 2015 16:45:00 +0000 http://thomaslarock.com/?p=11989#comment-12942 In reply to ??? ??????.

If you are asking about DBCC FREEPROCCACHE, that is logged to the SQL error log: https://msdn.microsoft.com/en-us/library/ms174283.aspx

]]>
By: ??? ?????? https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/#comment-12941 Wed, 08 Jul 2015 04:41:00 +0000 http://thomaslarock.com/?p=11989#comment-12941 Thanks, but how to get when was the last time QUERY STATISTICS are reset?

]]>
By: 101 Things I Wish You Knew About SQL Server - Thomas LaRock https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/#comment-12881 Wed, 24 Jun 2015 13:42:06 +0000 http://thomaslarock.com/?p=11989#comment-12881 […] sure you know the last time the SQL Server performance metricsĀ have been reset, otherwise you may overlook the root cause of an […]

]]>
By: S.E. https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/#comment-12730 Mon, 27 Apr 2015 21:35:00 +0000 http://thomaslarock.com/?p=11989#comment-12730 In reply to ThomasLaRock.

Acceptable standpoint. I saw no technical reason, that’s why I asked.

]]>
By: ThomasLaRock https://thomaslarock.com/2015/03/how-to-find-when-sql-server-wait-stats-were-last-cleared/#comment-12725 Sat, 18 Apr 2015 00:20:00 +0000 http://thomaslarock.com/?p=11989#comment-12725 In reply to S.E..

Habit. I like to break my code down into functional areas. That way if something changes it can reduce the impact of something breaking. Feel free to modify as you see fit.

]]>