Optimizing DAO

When using DAO, you can apply specific techniques to your code to improve its performance. This introductory chapter covers only optimizations that are intrinsic to the operation of DAO as a programming interface. The chapters listed in the following table contain additional information about optimizing performance.

To optimize See
Accessing local data Chapter 5, “Working with Records and Fields”
Multiuser environments Chapter 6, “Creating Multiuser Applications”
Accessing external ISAM data Chapter 8, “Accessing External Data”
Accessing ODBC data Chapter 9, “Developing Client/Server Applications”
Performance Chapter 13, “Optimizing Performance”

Few absolutes exist in the area of performance optimization. While a technique may work well in one piece of code, it may slow down other code. As with any optimization tips, use the following techniques judiciously. Try them in your code, and be sure to verify that they actually improve performance. Additionally, by concentrating on the 10 percent of your code that is executed most frequently, you will achieve better results than spending a lot of time tuning code that is rarely used.

Finally, the techniques shown in this chapter relate to using DAO in a generic sense, or demonstrate good coding practices. Usually, the most important optimizations involve your data, and reading and writing data to the disk. As a general rule, you should concentrate 95 percent of your optimization efforts on disk input/output-related code, and 5 percent on the type of optimizations shown here.