CPI4321 - Access path built for &18 &19

CPI4321
Message Text: Access path built for &18 &19.
Cause Text: A temporary access path was built to access records from member &6 of &18 &19 in library &5 for reason code &10. This process took &11 minutes and &12 seconds. The access path built contains &15 entries. The access path was built using &16 parallel tasks. A zero for the number of parallel tasks indicates that parallelism was not used. The reason codes and their meanings follow:
  1. Perform specified ordering/grouping criteria.
  2. Perform specified join criteria.
  3. Perform specified record selection to minimize I/O wait time.

The access path was built using the following key fields. The key fields and their corresponding sequence (ASCEND or DESCEND) will be shown:

&17.

A key field of *MAP indicates the key field is an expression (derived field).

The access path was built using sequence table &13 in library &14.

A sequence table of *N indicates the access path was built without a sequence table. A sequence table of *I indicates the table was an internally derived table that is not available to the user.

If &18 &19 in library &5 is a logical file then the access path is built over member &9 of physical file &7 in library &8.

A file name starting with *QUERY or *N indicates the access path was built over a temporary file.
Recovery Text: If this query is run frequently, you may want to create an access path (index) similar to this definition for performance reasons. Create the access path using sequence table &13 in library &14, unless the sequence table is *N. If an access path is created, it is possible the query optimizer may still choose to create a temporary access path to process the query.

If *MAP is returned for one of the key fields or *I is returned for the sequence table, then a permanent access path cannot be created. A permanent access path cannot be built with these specifications.

This message indicates that a temporary index was created to process the query. The new index is created by reading all of the rows in the specified table.

The time required to create an index on each run of a query can be significant. Consider creating a logical file (CRTLF) or an SQL index (CREATE INDEX SQL statement):

Consider creating the logical file with select or omit criteria that either match or partially match the query's predicates involving constants. The database manager will consider using select or omit logical files even though they are not explicitly specified on the query.

For certain queries, the optimizer may decide to create an index even when an existing one can be used. This might occur when a query has an ordering column as a key column for an index, and the only row selection specified uses a different column. If the row selection results in roughly 20% of the rows or more to be returned, then the optimizer may create a new index to get faster performance when accessing the data. The new index minimizes the amount of data that needs to be read.