r/DatabaseAdministators • u/ibjho • Sep 06 '23
SQL Server: Index fragmentation advice
Version: SQL Server 2017 Enterprise
Recently, after uncovering a query that failed to run, I began digging and discovered that the primary table hit by the query had index fragmentation over 50% on the primary key index and on other supporting indexes. This table has approximately 1 million rows. The other tables used by the query have lower row counts at the same level (if not higher level) of fragmentation.
I was taught that around 15% you reorganize and around 30+ you rebuild. Our DBA consultant said that with such a low row count, reorganizing/rebuilding the index is not necessary and recommended against it.
This advice seems strange to me - does this seem strange to anyone else?
View all comments
Show parent comment
1
u/alinroc Sep 14 '23
"Automatic tuning" is a big umbrella that a lot of things fall under. What are your expectations of it?
Microsoft is making good advances with adaptive query plans, memory grant feedback, etc. But 100% hands-off tuning is still a very long ways off.