Hierarchy

⤷

⤷

Basic Data
Data Element | QQRCOD |
Short Description | Reason code |
Data Type
Category of Dictionary Type | D | Domain |
Type of Object Referenced | No Information | |
Domain / Name of Reference Type | QQRCOD | |
Data Type | CHAR | Character String |
Length | 2 | |
Decimal Places | 0 | |
Output Length | 2 | |
Value Table |
Further Characteristics
Search Help: Name | ||
Search Help: Parameters | ||
Parameter ID | ||
Default Component name | ||
Change document | ||
No Input History | ||
Basic direction is set to LTR | ||
No BIDI Filtering |
Field Label
Length | Field Label | |
Short | 10 | ReasonCode |
Medium | 11 | Reason code |
Long | 11 | Reason code |
Heading | 2 | RC |
Documentation
Definition
For records with QQRID 3000, 3001, 3002, 3003, 3004, 3005 and 3006, QQRCOD specifies why the optimizer chose that method of implementing a query.
List of Reason Codes
QQRID = 3000: (arrival sequence used to implement query)
T1 - No indexes exist.
T2 - Indexes exist but none could be used.
T3 - Optimizer chose table scan over indexes.
QQRID = 3001: (Using Existing Index)
I1 - Record selection.
I2 - Ordering/grouping criteria.
I3 - Record selection and ordering/grouping criteria.
QQRID = 3002: (Temporary Index Created)
I1 - Record selection.
I2 - Ordering/grouping criteria.
I3 - Record selection and ordering/grouping criteria.
QQRID = 3003: (Query Sort)
F1 - Query contains grouping fields (GROUP BY) from more than one
file or contains grouping fields from a secondary file of a join
query that cannot be reordered.
F2 - Query contains ordering fields (ORDER BY) from more than one file
or contains ordering fields from a secondary file of a join query
that cannot be reordered.
F3 - The grouping and ordering fields are not compatible.
F4 - DISTINCT was specified for the query.
F5 - UNION was specified for the query.
F6 - Query had to be implemented using a sort.
Key length of more than 2000 bytes or more than 120 key fields
specified for ordering.
F7 - Query optimizer chose to use a sort rather than an access path
to order the results of the query.
F8 - Perform specified record selection to minimize I/O wait time.
QQRID = 3004: (Temporary File)
F1 - Query contains grouping fields (GROUP BY) from more than one
file, or contains grouping fields from a secondary file of a join
query that cannot be reordered.
F2 - Query contains ordering fields (ORDER BY) from more than one file,
or contains ordering fields from a secondary file of a join query
that cannot be reordered.
F3 - The grouping and ordering fields are not compatible.
F4 - DISTINCT was specified for the query.
F5 - UNION was specified for the query.
F6 - Query had to be implemented using a sort.
Key length of more than 2000 bytes or more than 120 key fields
specified for ordering.
F7 - Query optimizer chose to use a sort rather than an access path
to order the results of the query.
F8 - Perform specified record selection to minimize I/O wait time.
F9 - file is a Join Logical File and its join type does not match the
join type specified in the query.
FA - Format specified for the logical file references more than one
physical file.
FB - File is a complex SQL view requiring a temporary result file to
contain the result of the SQL view.
QQRID = 3005 (Locked Tables)
L1 - UNION with *ALL
L2 - DISTINCT with *ALL
L3 - No duplicate keys without *ALL
L4 - Temporary needed with *ALL
L5 - System file with *ALL
L6 - Order by > 2000 bytes
with *ALL
L7 - Temporary needed with *CS
L8 - System file with *CS
L9 - Unknown
QQRID = 3006 (Access Plan Rebuilt)
A1 - A file or member is not the same object as the one referenced when
the access plan was last built.
Some reasons that why they might be different:
- Object was deleted and recreated
- Object was saved and restored
- Library list was changed
- Object was renamed
- Object was moved
- Object was overridden by a different object
- This is the first run of the query after the object
containing the query was restored
A2 - Access plan was built to use a reusable Open Data Path (ODP) and
the optimizer chose to use a non-reusable ODP for this
non-reusable ODP for this call.
A3 - Access plan was built to use a non-reusable ODP and the optimizer
chose to use a reusable ODP for this call.
A4 - The number of records in the member has changed by more than 10%
since the access plan was last built.
A5 - A new access path exists over the member.
A6 - An access path over the member that was used for this access plan
no longer exists or is no longer valid.
A7 - OS/400 Query requires the access plan to be rebuilt because of
system programming changes.
A8 - The CCSID of the current job is different from the CCSID of the
job that last created the access plan.
A9 - The value of one or more of the following is different for the
current job than it was for the job that last created this access
plan: - Date format
- Date separator
- Time format
- Time separator
AA - The sort sequence table specified is different from the sort
sequence table that was used when this access plan was created.
History
Last changed by/on | SAP | 20070813 |
SAP Release Created in |