read_ahead
[buffers]
read_ahead=0 or 1
This value is only used in Windows at present. If it is 1 then DP4 may read data from a file before you have asked for it. It does this in two ways:
- When a program performs a fetch(NEXT) DP4 assumes it will soon perform another fetch(NEXT) to get the record after that, and so on, and starts asynchronous reads to ensure that parts of the file that this will access will be ready for reading.
- Whenever a file is accessed sequentially, or close to sequentially, DP4 performs read-ahead, by progressively increasing amounts so long as the file continues to be read sequentially, and only up to a maximum of two "tracksize" buffers ahead. This type of read_ahead is only performed when bypass_cache=2 - it is assumed the operating system will be capable of performing similar buffering for itself otherwise.
Read-ahead defaults to 1 if bypass_cache=2 and 0 otherwise. In our tests read_ahead was of little benefit unless the operating system file cache is disabled. However, it might still be of some benefit for a highly fragmented databased. On a large fragmented database read-ahead can reduce the time to fetch all the records in a table by 50% or more provided bypass_cache=2 is set.