Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Effect of Configuration on CPU Utilization > Configuration Parameters and Environment Variables That Affect CPU Utilization >

DS_MAX_SCANS

The DS_MAX_SCANS configuration parameter limits the number of PDQ scan threads that can run concurrently. This parameter prevents the database server from being flooded with scan threads from multiple decision-support queries.

To calculate the number of scan threads allocated to a query, use the following formula:

scan_threads  =                 min (nfrags, (DS_MAX_SCANS * pdqpriority / 100 
   * MAX_PDQPRIORITY / 100) )
nfrags
is the number of fragments in the table with the largest number of fragments.
pdqpriority
is the PDQ priority value set by either the PDQPRIORITY environment variable or the SQL statement SET PDQPRIORITY.

Reducing the number of scan threads can reduce the time that a large query waits in the ready queue, particularly when many large queries are submitted concurrently. However, if the number of scan threads is less than nfrags, the query takes longer once it is underway.

For example, if a query needs to scan 20 fragments in a table, but the scan_threads formula lets the query begin when only 10 scan threads are available, each scan thread scans two fragments serially. Query execution takes approximately twice as long as if 20 scan threads were used.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]