
You are here - Glossary and Definitions > Computer Terms and Abbreviations > Reindex
Reindex refers to a maintenance function that should be periodically performed on any database to make the system run faster and more efficiently.
An index is a special companion file to the database electronic storage container that functions in much the same way as the index in the book. In a book with an index a list of words have associated pointers to where those words can be found in the document. If you want to locate something in the book it isn’t necessary to read the entire book from cover-to-cover. Instead, you just look up the word in the index which points you to the page that contains the information for which you are looking.
A database index points at a record inside the database when you perform lookups and run reports. The computer program finds these lookups and prints reports in just a fraction of a second because the database index file contains pointers that point to the location of the record in the database. It is so much faster for the computer program to search an index than to search the entire database one record at a time.
Your users spend numerous hours entering data into the computer program database so that this data can be used for accounting reports and to support business operations. Every time a new record is added or an existing record is changed or deleted, all of the index file entries attached to that record are changed. Simplistically, when the record is changed, that record is moved to the bottom of the index and the place it originally occupied is now a hole in the index. When records are added the system does not yet know where they belong so they are also added to the end of the list. In both cases the records is outside the index and index list is no longer in the proper order.
When the computer program uses the index it ignores these records at the bottom of the list. The computer program system compensates for this and still shows the user the data in the right order on the screen, but over time - as more records are changed and/or added - the computer program searches become less efficient, the lookups will take longer and longer and reports will take longer to run as there are more records need to be searched one-by-one outside of the indexes. In addition, over time without maintenance the index may become corrupted which will cause the system to crash and is one of the causes of audit errors.
For these reasons, the index files need to be “reindexed” to put them back in order and to fix any errors which may corrupt the index. Reindexing the database is part of the normal maintenance which MUST be done for your database to work well. No one would think of driving their car without changing the oil, but they frequently “drive” their computer program database without reindexing – and then wonder why they start having problems. Just like with a car – the more miles you drive the more often you need to change the oil – so the more records you add or change in your computer program database the more often you need to reindex. The good news is that – unlike changing the oil in your car – reindexing does not cost anything except for a few minutes of your time.
If your database resides on a server and you reindex from your workstation, a failure in communication between your workstation and the server can cause the reindex to fail. Therefore reindexing over a network is more prone to failure than reindexing directly on the Server (the computer on which the database is physically located). If possible, computer program should be installed on this computer and the reindex performed from this server.
If there is any corruption in your database or you have a system glitch during the reindexing process, reindexing can fail. If this happens, your database may be left in a state where the data can not be recovered. Therefore, NEVER reindex without first making a backup copy of your database.
After you are sure you have a current back up, log in with exclusive access and follow your computer program instructions for performing a reindex.
© , 1996-2017 • Updated: 09/11/10
Comment or report problem with topic