Command reference / db

CHGQRYA

Change Query Attributes

Sets job-level options for database queries and for building or maintaining keyed access paths.

Allowed environments: *ALL. Positional parameters: 0.

Parameters

QRYTIMLMT Query time limit

Sets a limit for database queries allowed to be started based on the estimated number of elapsed seconds that the query requires to process.

Type
*INT4
Required
No
Default
*SAME
Range
0 to 2147352578
Case
Uppercase

Suggested / special values: *SAME, *NOMAX, *SYSVAL

*SAME
Keep the current setting.
*NOMAX
There is no maximum number of estimated elapsed seconds.
*SYSVAL
The query time limit should be obtained from the system value QQRYTIMLMT.
0-2147352578
Enter the maximum value that is checked against the estimated number of elapsed seconds required to run a query. If the estimated elapsed seconds is greater than this value, the query is not started.

QRYOPTLIB Query options file library

Select which library currently contains, or will contain, the query options file (QAQQINI).

Type
*NAME
Required
No
Default
*SAME
Length
10
Case
Uppercase

Suggested / special values: *SAME

*SAME
Keep the current setting.
name
Enter the name of the library where the QAQQINI query options file is (or will be) located.

Examples

CHGQRYA QRYTIMLMT(60)

Changes the query time limit to 60 seconds.

CHGQRYA DEGREE(*IO)

Specifies that any number of tasks may be used when the database query optimizer chooses to use I/O parallel processing for queries. SMP parallel processing is not allowed.

CHGQRYA DEGREE(*OPTIMIZE)

Specifies that the query optimizer can choose to use any number of tasks for either I/O or SMP parallel processing to process a query, database file keyed access path build or rebuild, or database file I/O keyed access path maintenance. SMP parallel processing will only be used if the system feature DB2 Symmetric Multiprocessing is installed.

CHGQRYA DEGREE(*MAX)

Specifies that the query optimizer can assume that all active memory in the pool can be used to process a query, database file keyed access path build or rebuild, or database file I/O keyed access path maintenance and can choose to use any number of tasks for either I/O or SMP parallel processing to process a query, database file keyed access path build or rebuild, or database file I/O keyed access path maintenance. SMP parallel processing will only be used if the system feature DB2 Symmetric Multiprocessing is installed.

CHGQRYA DEGREE(*NBRTASKS 12)

Specifies that the 12 tasks are to be used when the query optimizer chooses to use SMP parallel processing to process a query, database file keyed access path build or rebuild, or database file I/O keyed access path maintenance. I/O parallelism will also be allowed. SMP parallel processing will only be used if the system feature DB2 Symmetric Multiprocessing is installed.

CHGQRYA DEGREE(*SYSVAL)

Specifies that the query, database file keyed access path build or rebuild, or database file I/O keyed access path maintenance, should be optimized with the current value of system value QQRYDEGREE when the query, database file keyed access path build or rebuild, or database file I/O keyed access path maintenance is run.

CHGQRYA ASYNCJ(*LOCAL)

Prevents asynchronous jobs from being used for queries involving distributed files.

CHGQRYA ASYNCJ(*NONE)

Prevents asynchronous jobs from being used for any queries. In addition, for queries involving distributed files, communication to remote systems is done in a synchronous fashion.

CHGQRYA QRYOPTLIB(QUSRSYS)

Specifies that library QUSRSYS is to be searched for the existence of the query options file (QAQQINI).

CHGQRYA QRYOPTLIB(LIB41) JOB(134543/QPGMR/DSP01)

Specifies that library LIB41 is to be searched for the existence of the query options file (QAQQINI) for job number 134543. The job name is DSP01 and was started by the user named QPGMR.

CHGQRYA QRYSTGLMT(200)

Changes the query temporary storage limit to 200 megabytes.

IBM command documentation

Generated from os/cl/catalog/CHGQRYA.json and os/cl/help/CHGQRYA.json.