Some queries implemented with index scan-key selection can require a lot of random I/O in order to access an index or a table. Because of this, a high percentage of the data in the index or table is referenced. DB2 UDB for AS/400 attempts to avoid this random I/O by initiating index- or table-based preload when query processing begins. The entire table or index is loaded into active memory in parallel as is done for parallel table prefetch. This requires that you have enough memory in the pool to load the entire object.
After the table or index is loaded into memory, random access to the data is achieved without further I/O. The DB2 UDB for AS/400 cost-based query optimizer recognizes the queries and objects that benefit from table or index preloads if I/O parallel processing has been enabled. See "Control parallel processing for queries" for information on how to control parallel processing. If DB2 UDB Symmetric Multiprocessing is installed, then the query optimizer usually prefers the DB2 UDB Symmetric Multiprocessing parallel methods.
The parallel preload method can be used with any of the other data access methods. The preload is started when the query is opened and control is returned to the application before the preload is finished. The application continues fetching rows using the other database access methods without any knowledge of preload.