19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.1 Online CHECK INDEX<br />

Online CHECK INDEX is a new capability of <strong>DB2</strong> V8, added by APARs PQ92749 (PTF<br />

UK04683) and PQ96956 (still OPEN), which allows you to have read-write access to<br />

applications during CHECK INDEX and contributes to decreasing read-only time <strong>for</strong> users.<br />

This function satisfies the high availability requirement of users with very large tables who<br />

cannot af<strong>for</strong>d the application outage caused by the extensive read-only time required to run<br />

the normal CHECK INDEX.<br />

CHECK INDEX is an online utility which is used to test whether an index is consistent with its<br />

data. It is generally useful after a conditional restart or point-in-time recovery. It is also<br />

recommended to run CHECK INDEX be<strong>for</strong>e CHECK DATA, especially if you specify DELETE<br />

YES. Running CHECK INDEX be<strong>for</strong>e CHECK DATA ensures that the indexes that CHECK<br />

DATA uses are valid. In <strong>DB2</strong> V8 the utility statement CHECK INDEX was enhanced to<br />

designate the current read-only behavior as SHRLEVEL REFERENCE, and designate a<br />

reduction of restricted availability with the new SHRLEVEL CHANGE option. In addition<br />

CHECK INDEX provides a parallel processing structure similar to REBUILD INDEX.<br />

SHRLEVEL REFERENCE and SHRLEVEL CHANGE<br />

There are two options to indicate the type of access that is allowed <strong>for</strong> objects to be checked<br />

during the procedure. Figure 6-1 shows the utility process with the two options.<br />

indexes<br />

tablespaces<br />

UNLOAD<br />

phase<br />

unload index<br />

entries<br />

Figure 6-1 CHECK INDEX SHRLEVEL REFERENCE and SHRLEVEL CHANGE<br />

If you specify SHRLEVEL REFERENCE, which is also the default, the application can read<br />

from but cannot write to the index, table space, or partition that is to be checked.<br />

262 <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Per<strong>for</strong>mance <strong>Topics</strong><br />

CHECK INDEX SHRLEVEL REFERENCE<br />

SORT<br />

phase<br />

Sort index<br />

entries<br />

Temporary work datasets<br />

CHKIDX<br />

phase<br />

Scan tablespace<br />

data to validate<br />

CHECK INDEX SHRLEVEL CHANGE<br />

SNAPSHOT COPY (e.g., FlashCopy 2)<br />

tablespaces<br />

tablespaces Shadow dataset Shadow dataset<br />

tablespaces<br />

tablespaces<br />

UNLOAD<br />

phase<br />

unload from<br />

table space<br />

to workfile<br />

SORT<br />

phase<br />

Sort index<br />

keys<br />

MERGE<br />

phase<br />

Merge index<br />

keys (only<br />

in NPI)<br />

CHKIDX<br />

phase<br />

Scan index<br />

to validate<br />

indexes<br />

Temporary work datasets<br />

indexes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!