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.

make <strong>DB2</strong> take the maximum parallelism in sort tasks it is recommended to estimate the sort<br />

work data set size correctly.<br />

Note: APAR PQ92749 and PQ96956 provide the CHECK INDEX availability<br />

enhancement.<br />

6.2 LOAD and REORG<br />

SORTKEYS <strong>for</strong> LOAD and REORG, and SORTDATA <strong>for</strong> REORG are keywords which<br />

generally contribute to better per<strong>for</strong>mance. In V7 SORTKEYS and SORTDATA were not the<br />

default, so you had to specify explicitly these parameters to activate the methods providing<br />

better per<strong>for</strong>mance. In V7 if SORTKEYS is not specified, and if data is 100% clustered and<br />

there is only one index on the table, LOAD utilities skip the SORT phase. If you want to exploit<br />

the functions, you need to change the utility jobs to add these keywords. In V8, SORTKEYS in<br />

the LOAD utility is the default and SORTDATA and SORKEYS are the default in the REORG<br />

utility. The SORT phase is en<strong>for</strong>ced in LOAD and REORG in V8.<br />

SORTKEYS cuts down the elapsed time of the index key sort by reducing I/O to the work file,<br />

since using SORTKEYS index keys are passed in memory rather than written to the work file.<br />

In addition, SORTKEYS provides a method of parallel index build. If there is more than one<br />

index on your table space or partition, it reduces the elapsed time of LOAD jobs.<br />

SORTDATA in the REORG utility specifies that the data is to be unloaded by a table space<br />

scan, and sorted in clustering order. This allows a consistent execution time <strong>for</strong> REORG and<br />

good per<strong>for</strong>mance whether the data is disorganized or not.<br />

6.2.1 LOAD with default per<strong>for</strong>mance measurement<br />

The following per<strong>for</strong>mance measurement has been done to observe LOAD per<strong>for</strong>mance with<br />

the default option of SORTKEYS. The purpose of the measurement is to assess the<br />

per<strong>for</strong>mance benefit of the SORTKEYS method provided as default. In this measurement we<br />

run a comparison of LOAD utilities in V7 and V8 over table spaces with 1 index, 2 indexes,<br />

and 6 indexes. The following is the description of our test environment.<br />

► 1 partitioned table with 10 partitions<br />

► 1,000,000 rows in one partition (total 10 million rows) and 118 byte row size<br />

► 26 columns of CHAR, INTEGER, and DECIMAL data type<br />

Figure 6-4 summarizes the results.<br />

LOAD executed against the table space with just one index shows up to 11% CPU<br />

degradation and 7% elapsed time degradation in V8 compared to V7. When more than 1<br />

index exists, V8 per<strong>for</strong>ms better in terms of CPU and elapsed time. The dramatic elapsed<br />

time reduction in V8 with 6 indexes comes from parallel processing. One thing to be<br />

considered is that more work file space is needed to accommodate parallel processing.<br />

268 <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!