Limiting the priority of decision-support queries
You can limit the parallel processing resources that decision-support (DSS) queries consume by adjusting the values of PDQPRIORITY environment variable, the MAX_PDQPRIORITY configuration parameter, and other configuration parameters.
0
, which means that PDQ processing is not used.
The database server uses this value unless one of the following actions
overrides it: - You set the PDQPRIORITY environment variable.
- The application uses the SET PDQPRIORITY statement.
The PDQPRIORITY environment variable and the MAX_PDQPRIORITY configuration parameter work together to control the amount of resources to allocate for parallel processing. Setting these correctly is critical for the effective operation of PDQ.
The MAX_PDQPRIORITY configuration parameter allows you to limit the parallel processing resources that DSS queries consume. Thus, the PDQPRIORITY environment variable sets a reasonable or recommended priority value, and MAX_PDQPRIORITY limits the resources that an application can claim.
The MAX_PDQPRIORITY configuration parameter specifies the maximum
percentage of the requested resources that a query can obtain. For
instance, if PDQPRIORITY is 80
and MAX_PDQPRIORITY
is 50
, each active query receives an amount of memory
equal to 40 percent of DS_TOTAL_MEMORY, rounded down to the nearest
quantum. In this example, MAX_PDQPRIORITY effectively limits the number
of concurrent decision-support queries to two. Subsequent queries
must wait for earlier queries to finish before they acquire the resources
that they need to run.
An application or user can use the DEFAULT tag of the SET PDQPRIORITY
statement to use the value for PDQ priority if the value has been
set by the PDQPRIORITY environment variable. DEFAULT is the
symbolic equivalent of a -1
value for PDQ priority.
- Use onmode -M to change the value of DS_TOTAL_MEMORY.
- Use onmode -Q to change the value of DS_MAX_QUERIES.
- Use onmode -D to change the value of MAX_PDQPRIORITY.
- Use onmode -S to change the value of DS_MAX_SCANS.
These changes remain in effect only as long as the database server remains up and running. When the database server starts, it uses the values listed in the ONCONFIG file.
For more information about the preceding parameters, see Effect of configuration on memory utilization. For more information about onmode, see your HCL OneDB Administrator's Reference.
If you must change the values of the decision-support parameters
on a regular basis (for example, to set MAX_PDQPRIORITY to 100
each
night for processing reports), you can use a scheduled operating-system
job to set the values. For information about creating scheduled jobs,
see your operating-system manuals.
To obtain the best performance from the database server, choose values for the PDQPRIORITY environment variable and MAX_PDQPRIORITY parameter, observe the resulting behavior, and then adjust the values for these parameters. No well-defined rules exist for choosing these environment variable and parameter values. The following sections discuss strategies for setting PDQPRIORITY and MAX_PDQPRIORITY for specific needs.