bdfd1m17Database Administration

Reducing File Accesses

You may be able to reduce the number of file accesses by moving data from detail subfiles into the index file. Figure 46 shows a TPFDF index file with a number of detail subfiles.

Note:
The Name fields refer to the passenger name.

Figure 46. Index File Pointing to Detail Subfiles


The number of file accesses could be reduced considerably if the data in the subfiles were moved to the index file. Figure 47 shows the resulting single file.

Figure 47. Subfile Data Moved to Index File


The original index file contained pointers to the detail subfiles. Now that these have been removed, the pointers are no longer needed. As you can see here, they have been removed from the index file.

Note:
If the detail subfiles contain a lot of data, it may not be feasible to move this data to the index file. Working from the requirements of your application, you will need to estimate how much data can be stored in the index file without lowering performance levels.