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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Percent of index pages<br />

Avg. Index Leaf Pages and Getpages <strong>for</strong> 15 Queries<br />

-10<br />

-20<br />

-30<br />

-40<br />

-50<br />

Figure 5-14 Average index leaf pages and index getpages<br />

Initially there is no benefit from not padded index keys as together with the key also the length<br />

bytes are saved. The longer the VARCHAR becomes the more the benefit from not padding<br />

becomes visible. Index storage requirements could be reduced as only the actual data is<br />

stored and the index tree may have fewer levels.<br />

In a third measurement the impact of NOT PADDED indexes on utilities was measured. We<br />

used a table with 10 M rows and one PADDED or NOT PADDED index. The following cases<br />

were measured:<br />

1. 10 M rows table with a one-column indexed key of VARCHAR(14) with varying length from<br />

1 to 14.<br />

2. 10 M rows table with a one-column indexed key of VARCHAR(1)<br />

3. 10 M rows table with a four-column indexed key of each VARCHAR(1)<br />

The tests were run <strong>for</strong> LOAD, REORG table space, REORG index, REBUILD, CHECK index<br />

and RUNSTATS index.<br />

See Figure 5-15 <strong>for</strong> the measurement result of test case 1.<br />

240 <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 />

20<br />

10<br />

0<br />

Queries using NOT PADDED vs. PADDED keys<br />

VC10 VC20 VC30 VC40 VC50<br />

# of Leaf Pages<br />

Index Getpages

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

Saved successfully!

Ooh no, something went wrong!