IBM SC41-5210-04 Server User Manual


 
However, if the data you want to view is at the end of the searched records, it may take longer than
anticipated to display those records. This may also be true when paging down to access more data (even
if the first display did appear quickly) if the additional data is located much further into the file. If Query has
to build a large access path prior to retrieving data it takes longer to reach the first display.
Specify output type 1 (Display) and output form 1 (Detail) for a multi-copy query. Specify output type 2
(Printer) for a column list query.
Specify processing options in Query for iSeries
The key option on the Specify Processing Options display is whether to ignore decimal data errors (see
File definitions and data in Query for iSerieson page 233 for a description of decimal data errors). If
decimal data errors are ignored, Query cannot use any existing access paths for that file and has to build
an access path if one is required for the query, and additional processing is required to handle any fields
with decimal data errors.
If decimal data errors are not ignored, Query stops processing if it encounters a decimal data error.
However, if Query does not encounter any decimal data errors during processing, it can use existing
access paths and runs normally.
Note: This handling of decimal data errors only affects queries that use numeric fields. Queries that use
only character fields are not affected by this option.
When specifying whether to ignore decimal data errors, you have these choices:
v Y (Yes) means ignore decimal data errors.
v N (No) means do not ignore decimal data errors.
v Leaving the Ignore Decimal Data Errors field blank means Query chooses either Y or N, depending on
the environment in which you are running the query.
If the query is run in the System/36 environment, Query uses Y and decimal data errors are ignored. If
the query is run in the System/38 environment or OS/400 environment, Query uses N and decimal data
errors are not ignored. The System/36 environment uses Y because decimal data errors were always
ignored on the System/36. Because access paths cannot be used when Y (the default) is used in the
System/36 environment, there may be substantial performance differences between the environments if
the default is used.
You may want to consider eliminating decimal data errors to make sure you can use existing access paths
and to eliminate the extra processing needed to handle these errors. Use the Programmers Tool Kit
PRPQ that is available for the iSeries system. If you cannot eliminate the decimal errors, you may want to
choose Y (or use RUNQRY in the System/36 environment to get Y to default) to make your query run
faster. Even if it is necessary to build a new access path, this may take less time than diagnosing decimal
data errors.
Using join operations in Query for iSeries
Queries involving join operations have special considerations relating to performance. Although the
performance tips listed prior to this may apply to individual files within a join, Query must consider all the
values involving all the files to be joined and then make a decision on how best to proceed with the query.
One of the key concepts of joins is that of primary and secondary files. The primary file is the first file
used in the join while the secondary files are those that are joined to the primary.
You can select one of three types of join operations when defining a join query:
Option 1Matched records
A record from the primary file is selected only if there is a match with every secondary file
specified.
238 Query for iSeries Use V5R2