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.

Table 5-5 DPSI overhead<br />

Access path PLC - index only<br />

EVE - index only<br />

The DPSI overhead is explained by <strong>DB2</strong> having to probe each DPSI partition in order to<br />

evaluate the predicates. The access path remains the same in both test cases.<br />

In order to illustrate an access path change from changing use of a NPI to a DPSI we<br />

evaluated the following query:<br />

SELECT COUNT(DISTINCT CSCD) FROM CVR<br />

Table 5-6 shows the measurement results.<br />

Table 5-6 DPSI access path change<br />

NPI DPSI % difference<br />

PLC - index only<br />

EVE - index only<br />

CPU (sec.) 0.021699 0.083861 + 281<br />

Elapsed (sec.) 0.037188 0.305458 + 721<br />

Index getpages 8 17,000<br />

NPI DPSI % difference<br />

Access path index only table space scan + sort<br />

CPU (sec.) 1.21221 8.30175 + 585<br />

Elapsed (sec.) 1.317186 24.67209 + 1773<br />

Getpages 2k index getpages 139k data getpages +<br />

29k work file getpages<br />

Conclusion<br />

Utility processing benefits from the use of DPSIs. Query processing using only the DPSI in<br />

the access path has to probe every partition of the DPSI to evaluate the predicates due to the<br />

non-unique nature of the DPSI. In a data sharing environment, if some workloads are partition<br />

and member specific, reduced data sharing overhead is possible with DPSIs as intersystem<br />

read/write interest on physical partitions can be eliminated vs. non-partitioned indexes, where<br />

keys belonging to different data partitions are spread throughout the non-partitioned index.<br />

Recommendations<br />

Replacing all NPIs by DPSIs is not the objective. NPIs will still prove to be useful. Utilities will<br />

definitely benefit from DPSIs while contention at the logical partition level is eliminated.<br />

Queries that combine predicates on the partitioning columns and the DPSI will per<strong>for</strong>m well.<br />

Explicitly coding the partitioning columns in the predicate allows the <strong>DB2</strong> optimizer to<br />

eliminate not qualifying partitions from the query. This is called partition pruning. Pruning can<br />

be deferred until execution time if host variables are used. The pruning takes place once the<br />

contents of the host variables are known.<br />

When using DPSIs part of the responsibility is shifted from DBA to development. Coding the<br />

correct predicates to allow <strong>for</strong> partition pruning is crucial to per<strong>for</strong>mance.<br />

The use of DPSIs versus NPIs is dictated by availability considerations. If, <strong>for</strong> example, even<br />

the outage due to the BUILD2 phase of an online REORG cannot be tolerated DPSIs are the<br />

solution.<br />

Chapter 5. Availability and capacity enhancements 255

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

Saved successfully!

Ooh no, something went wrong!