next up previous contents
Next: 4.3 Structure files Up: 4 Qddb filesstructures Previous: 4.1 The stable and

4.2 Stabilization

Searches work just as well for tuples in Changes and Additions as for tuples in Database, but much more slowly, since they don't have the advantage of the structure files. Searches must inspect all the files in both directories. After a while, perhaps after hundreds of changes, you will find searches too slow. It is time to collect all the updates and additions and rebuild both Database and the structure files. This event is called stabilization. Stabilization is time-consuming, but it is our experience that only very heavily modified large databases cannot be stabilized overnight.

You should only stabilize a relation when no one is accessing it. (Qddb uses locks to enforce this restriction.) The stabilization process takes time depending on the type and speed of the machine that you have. Stabilizing a 20-30MB relation on a 20 mips machine can take about 15-20 minutes.

To begin the stabilization process, type:

    $ qstall Relation
If you have manually edited Database (not generally a good practice), qstall will notice and not trust any of the structure files; otherwise, it will trust some of the files in order to speed the process of integrating your changed or new data.

When Qddb is installed, it is configured with a maximum stabilization growth value. This limit determines how much information the stabilization routines try to keep in memory before they are forced to output partial results to an intermediate file. At the end, all the intermediate files are merged to form the structure files. The more that Qddb can hold in memory, the faster stabilization will be, but Qddb should not be configured to use more memory than is available. If you have a 16MB machine, we find that around 5MB (which is the default) is a good maximum stabilization growth. For a 32MB machine, around 12MB is usually pretty good. A 64MB machine can usually handle about 22MB.


next up previous contents
Next: 4.3 Structure files Up: 4 Qddb filesstructures Previous: 4.1 The stable and

Herrin Software Development, Inc.