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.

SORTOUT DD UNIT=SYSDA,SPACE=(CYL,(5,2)),VOL=SER=SCR03<br />

//SYSERR DD UNIT=SYSDA,SPACE=(CYL,(5,2)),VOL=SER=SCR03<br />

//SYSIN DD *<br />

LISTDEF CHKIDXB_LIST INCLUDE INDEXSPACE DBOT55*.* ALL<br />

CHECK INDEX LIST CHKIDXB_LIST SHRLEVEL CHANGE<br />

WORKDDN SYSUT1<br />

SORTDEVT SYSDA<br />

SORTNUM 4<br />

/*<br />

You should estimate the size of the sort work file which you write in the SORTWKnn DD<br />

statement of the JCL. If a sort is required, you must provide the DD statement that the sort<br />

program requires <strong>for</strong> the temporary data sets.<br />

Note: To find the size of the sort work, the following steps should be taken.<br />

1. For each table, multiply the number of records in the table by the number of indexes on<br />

the table that need to be checked.<br />

2. Add the products that you obtain in step 1.<br />

3. Add 8 to the length of the longest key. For non padded indexes, the length of the longest<br />

key is the maximum possible length of the key with all varying-length columns in the key<br />

padded to their maximum length, plus 2 bytes <strong>for</strong> each varying-length column.<br />

4. Multiply the sum from step 2 by the sum from step 3.<br />

Availability enhancement<br />

To improve availability, the DRAIN_WAIT, RETRY, and RETRY_DELAY parameters were<br />

added to CHECK INDEX. This is similar to online REORG. Rather than waiting the lock time<br />

out time, the utility multiplier <strong>for</strong> threads to relinquish the write claim, the utility will wait the<br />

DRAIN_WAIT value to get all writers drained and if the drain is not successful, wait the<br />

specified delay, and then retry the specified number of times. This will lessen the impact on<br />

applications when the utility is unable to drain all objects.<br />

Recommendation in creating shadow data sets<br />

When you execute the CHECK INDEX utility with the SHRLEVEL CHANGE option, the utility<br />

uses shadow data sets. For user-managed data sets, you must preallocate the shadow data<br />

sets be<strong>for</strong>e you execute CHECK INDEX SHRLEVEL CHANGE.<br />

If a table space, partition, or index that resides in <strong>DB2</strong>-managed data sets and shadow data<br />

sets does not already exist when you execute CHECK INDEX, <strong>DB2</strong> creates the shadow data<br />

sets. At the end of CHECK INDEX processing, the <strong>DB2</strong>-managed shadow data sets are<br />

deleted. We recommend you create the shadow data set in advance <strong>for</strong> <strong>DB2</strong>-managed data<br />

sets also, especially <strong>for</strong> the shadow data sets of the logical partitions of non-partitioned<br />

secondary indexes.<br />

See <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Utility Guide and Reference, SC18-7427, <strong>for</strong> more<br />

in<strong>for</strong>mation about this topic.<br />

6.1.1 Per<strong>for</strong>mance measurement<br />

Several per<strong>for</strong>mance studies have been done about online CHECK INDEX. Here we describe<br />

the measurement environment and results.<br />

Test environment and scenarios<br />

264 <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>

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

Saved successfully!

Ooh no, something went wrong!