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.

30<br />

25<br />

20<br />

15<br />

10<br />

Figure 5-12 FETCH CPU time - Alter index not padded and rebind<br />

The FETCH CPU time after rebind shows no difference compared to an originally created<br />

NOT PADDED index. Also an index-only access path is used after rebind.<br />

A second test was run with a set of 15 queries doing joins on two VARCHAR(10) columns.<br />

The join columns are accessed via matching index scan. We measured the query<br />

per<strong>for</strong>mance <strong>for</strong> this set of queries using padded keys. Then we altered the indexes to NOT<br />

padded, ran rebuild index and RUNSTATS and measured the query per<strong>for</strong>mance <strong>for</strong> 15<br />

queries using not padded keys. We repeated this test with VARCHAR(20) and VARCHAR(30)<br />

columns. In Figure 5-13 we show the CPU overhead using NOT PADDED indexes vs.<br />

PADDED indexes.<br />

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

5<br />

0<br />

(1) (2) (3) (4)<br />

CPU time (microseconds) Fetch CPU time …Alter Index Padding<br />

padded padded => rebind not padded not padded<br />

ix not padded program => padded ix<br />

Fetch CPU time reduced after application program rebind<br />

- access path changed to index-only access

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

Saved successfully!

Ooh no, something went wrong!