Sample Header Ad - 728x90

Constant rebuilding indexes to fix performance - why?

2 votes
3 answers
3504 views
We have a database server (2016 SQL Server), that we have added a step of 'rebuilding indexes' to the deployment process. In decades of working with MS SQL Server at a many companies, I've never ONCE had to rebuild the indexes in order to fix a performance problem. Yet, we do it at least every 2 weeks, and often times more often than that. And I'm told "yep! that fixed the problem!" It seems to me, it is much more likely to have fixed a symptom. I know, I've had an issue with a database where a query would run > 10 minutes the first time, and in a few milliseconds after it had completed once. (In this case, it had built a temp index on Right(field,8) that someone was using in the query, and adding an index on that fixed it) I'm thinking maybe a rebuild is causing everything to be loaded into memory, so the server has the entire index right there and ready to use? Has anyone else seen this, and is this an indication of another issue that maybe we can fix? (More RAM, better disks, or something?)
Asked by Traderhut Games (173 rep)
Jan 17, 2022, 04:59 PM
Last activity: Nov 10, 2022, 05:06 AM