Comments on: Rebuilding Indexes Will Reset Index Usage Statistics in SQL Server 2012 https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/ 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. Mon, 01 Jul 2024 09:33:45 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: HASH Index - ???? ??????? https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/#comment-94638 Mon, 01 Jul 2024 09:33:45 +0000 http://thomaslarock.com/?p=9944#comment-94638 […] https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-… […]

]]>
By: Roni Vered Adar https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/#comment-7955 Mon, 07 Jan 2013 11:28:00 +0000 http://thomaslarock.com/?p=9944#comment-7955 We’re working on 2008, and I was just about to write a comment that rebuilding doesn’t reset the index usage statistics, until I’ve read the other comments 🙂

It’s a very important behavior change in 2012.

]]>
By: ThomasLaRock https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/#comment-7954 Mon, 07 Jan 2013 00:45:00 +0000 http://thomaslarock.com/?p=9944#comment-7954 In reply to Marios Philippopoulos.

Happy to help!

]]>
By: Marios Philippopoulos https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/#comment-7952 Sun, 06 Jan 2013 21:19:00 +0000 http://thomaslarock.com/?p=9944#comment-7952 This is terrible news, we have to get Microsoft to fix this for SQL 2012.

I collect index stats every 12 hrs but I only archive this info after instance restarts! Looks like I should start archiving it after index rebuilds as well.

Thank you for this post,
Marios Philippopoulos

]]>
By: ThomasLaRock https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/#comment-7951 Sat, 05 Jan 2013 19:52:00 +0000 http://thomaslarock.com/?p=9944#comment-7951 In reply to Feodor Georgiev.

Oh yes, it makes perfect sense as to why it happens.

]]>
By: Feodor Georgiev https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/#comment-7950 Sat, 05 Jan 2013 19:43:00 +0000 http://thomaslarock.com/?p=9944#comment-7950 In reply to ThomasLaRock.

It only makes sense – the datatypes for the user_scans column from sys.dm_db_index_usage_stats is bigint, so as soon as the limit is reached, it will have to go back from the start.
Whether it is to the boundry of the negative numbers or to 0, the results of the DMVs will be skewed.
In other words, your post has a very good point – we can’t trust the DMVs over a very log periods of time.

]]>
By: ThomasLaRock https://thomaslarock.com/2013/01/rebuilding-indexes-will-reset-index-usage-statistics-in-sql-server-2012/#comment-7949 Sat, 05 Jan 2013 16:09:00 +0000 http://thomaslarock.com/?p=9944#comment-7949 In reply to Feodor Georgiev.

No, I had not seen that for the index usage DMVs, but I have seen that behavior in other areas for SQL Server. IIRC, the GUI used to show a negative number for data file size in SQL 2005 once in a while. I haven’t seen it in years though.

]]>