What is an Index?
EXACT data is stored in tables. Tables are like long lists with different columns of information; at the top of each column is a heading to say what is stored there. Each line in the table is called a record; each entry on a line is called a field. When you add another record the table gets longer. As you can imagine some of the tables in EXACT get very long indeed.
When you ask the computer to show you a particular record it has to look down the table reading every entry to find the record that you asked for. The longer the table, the longer the record takes to find. Indexes get around this problem by telling the computer exactly where in the table to look.
For every table of information in EXACT there is a corresponding index file, which tells the computer where to find the records in that table. Sometimes an index file may contain more than one index, this lets you look up the record in different ways. The patient file for example, contains many indexes allowing you to look up patients by surname, date of birth and phone number amongst others.
What is rebuilding an Index?
Indexes are very important to a database. If the index becomes damaged and can no longer tell the computer where to find a record, then the computer may not be able to display that record, even though the record still exists in the main table. The rebuilding process goes through the table and recreates the index from scratch. If a table needs more than one index it will be traversed once for each index. Because the indexes are completely recreated by the rebuild process they are completely disposable.
Every time a new record is added or an existing record amended the corresponding indexes will need to be adjusted to reflect this. Thus you can see that one change to a data table can result in many writes to the index files. It is because of this that index files tend to corrupt more easily than table.
Using the client/server model of the database can significantly reduce all types of corruption to the files. The majority of corruption occurs due to network problems, either network cards sending faulty data or data being garbled by interference in the wiring. The client server mode eliminates this by having an active process on the server that ‘vets’ all incoming data and only writes to the table, data that it approves of.
When should you rebuild indexes?
There are three occasions when you should perform a rebuild.
Why should you rebuild indexes?
You should rebuild an index file because:
To rebuild indexes
Why is it necessary to do this?
Once you start a rebuild you will not be able to use the system until it is complete. The only way around this is to restore a backup.