NPGTHRSH—NPAGE threshold


Use the Modify NPAGE Threshold panel or the NPGTHRSH command to specify the tables for which Db2 favors matching index access.

The NPGTHRSH parameter lets you specify that Db2 uses special access path selection for tables under a given size. In this situation, you should run RUNSTATS again after the table is populated. Otherwise, you can use the NPGTHRSH parameter to cause Db2 to favor matching index access over a table space scan and over nonmatching index access.

Warning

Note

Keep in mind that in some cases, matching index access can be more costly than a table space scan or nonmatching index access. Specify a small value for NPGTHRSH (10 or less) to limit the number of tables for which Db2 favors matching index access.

Modify NPAGE Threshold panel

DDTJ DEBD Modify NPAGE Threshold ALL VALUE FIELDS EMPTY
Command ===> _________________________________________________________________

  Command: CURRENT
Description . . . . . . . . : NPAGE THRESHOLD

Type the new NPAGE Threshold Value you wish to change to. Then Press Enter.

NPAGE Threshold
NPAGE Threshold . . . . . (ALL, COST, 1 to 2147483647 or delta)

Command syntax and parameters

image2018-12-24_12-16-38.png

Value

Description

DB2ssid

Db2 subsystem ID or the name of the Db2 data sharing group to which the command applies.

opertuneID

OPERTUNE system profile name (if OPERTUNE is running as a started task) or the batch job name (if OPERTUNE is running as a batch job).

COST

Db2 selects the access path based on cost, and no tables qualify for special handling This is the default.

ALL

Db2 favors matching index access for all tables.

value

NPAGES threshold value. Specify one of the following values:

  • A numerical value in the range 1–2147483647
  • A delta value
    Delta values are expressed numerically (+nn or -nn) or as a percentage (+nn% or -nn%). The resulting value must fall in the range 1–2147483647.

If data access statistics have been collected for all tables, and the total number of pages on which rows of the table appear (NPAGES) is less than this value, Db2 favors matching index access.

If data access statistics have not been collected for some tables (NPAGES=ALL), Db2 favors matching index access for tables where NPAGES=ALL or is less than this value.

NORESET

The changes you request remain in effect until the Db2 subsystem is cycled.

Db2 parameter values

Field

Installation panel

CLIST parameter

ZPARM macro

ZPARM parameter

NPAGE Threshold

None

None

DSN6SPRM

NPGTHRSH

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

OPERTUNE for DB2 12.1