If the performance kept falling down constantly then the first thing that people usually check are the systems those are involved in the configuration of the best practices, though regular index maintenance still has many benefits attached to it.
Index development is also very crucial for the time being, but only maintenance can help us make sure that if we have any empty space that is wasting a lot of memory.
One must use automated index maintenance, it helps to monitor the runtime and IO use and run only at lower volumes. Well to know more about how much downtime you require one must implement their index maintenance and analyze how many how many tables can be turned offline in every database.
Rebuild and reorganization are the main two operations that enable each fragmentation to reduce in every index.
If you use a new fill factor one can rebuild an index but only when index is disabled. One must make sure that they do not rebuild their index midway and then it might roll back.
Reorganize, this option is very light and easy to use; this reorganization enables the leaf level of the index, if you reorganize the index maintenance then it physically orders pages and compacts pages to apply and set fill factor settings.
The best part of this program is that it is done online only and if you cancel it then it will just halt or stop where it is unlike the rebuild program.
There are certain factors one must consider before they are planning to either rebuild or reorganize
- Standard edition of rebuild isn’t awesome as this always happens offline and is always single thread.
- One can try an online rebuild as well but only if there are no huge databases stored in it, but this an exclusive way and this might lead to blockage.
- If you are trying to use a SQL server 2012, SP1 and SP2 parallel online index rebuild might lead to corruption only so this might be harmful for the whole system.
- The trickiest part is to rebuild the partitioned tables, though you can rebuild the entire system online people still choose not to as they are huge.
- Reorganizing can be pretty cool which defragments the leaf level of index, but the best part of this is that it is solely done online so one can pause and restart all over again easily.
So now if you are confused as to rebuild or reorganize then you must know that this should be done in some scenarios only and following are they.
- If you face a regular downtime scheduled continuously or say every weekend, then rebuilding the index maintenance of SQL server is suggested.
- If you have an enterprise edition, then go for index rebuilds and use the online option so that you can easily access to the database and this is done during the maintenance of the window of your system.
The author of this article is a Computer Engineer with 3 years of work experience in the IT industry. On the job the author has extensive hands on experience of index development . Being an expert in servers and SQL, the author has keen and undivided nag for various index maintenance solutions and coming up with new and better solutions as and when possible.