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.

RUNSTATS INDEX PARTITION of a DPSI showed equivalent per<strong>for</strong>mance to a partition of a<br />

PI. Comparing to RUNSTATS INDEX of a logical part of a NPI, the per<strong>for</strong>mance was better.<br />

Per<strong>for</strong>mance measurement result <strong>for</strong> queries and DPSIs<br />

We executed queries against 3 partitioned tables with an NPI and a DPSI on the same<br />

columns. The measurements were done with and without parallelism.<br />

The tables used are:<br />

► CVR - 1,654,700 rows, 10 partitions<br />

► EVE - 931,174 rows, 6 partitions<br />

► PLC - 624,473 rows, 8 partitions<br />

Attention: Make sure PTF UQ93972 <strong>for</strong> APAR PQ92227, which addresses SQL<br />

per<strong>for</strong>mance problems with DPSIs, is applied.<br />

Table 5-3 shows the measurement results <strong>for</strong> the following query:<br />

SELECT COUNT(*) FROM CVR<br />

Table 5-3 NPI vs. DPSI SELECT COUNT query<br />

This is the case of an index scan. Almost the same number of index getpages are executed<br />

<strong>for</strong> DPSI as <strong>for</strong> NPI. The results shown are those of the second execution of the queries (data<br />

sets are all open) but the data is not preloaded. The query with predicates that only reference<br />

DPSI indexed columns experiences a reduction in CPU time of 23% compared to an NPI on<br />

the same columns. Since these queries are close to CPU bound, a similar reduction in<br />

elapsed time of 19% is experienced.<br />

The same query was also executed with parallelism enabled. The results are presented in<br />

Table 5-4.<br />

Table 5-4 NPI vs. DPSI SELECT COUNT query parallelism<br />

Parallelism helps quite a lot in improving the elapsed time because of the probing in parallel of<br />

the DPSI. The reduction in CPU is somewhat offset by the activation of parallelism, but the<br />

elapsed time improvement is 64%.<br />

Now we evaluate a query which qualifies data on NPI and DPSI columns in order to verify the<br />

overhead of DPSI over NPI:<br />

SELECT COUNT(*) FROM EVE, PLC WHERE EVE_DPSI>=PLC_DPSI AND PLC_DPSI = constant<br />

Table 5-5 shows the results <strong>for</strong> this query.<br />

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

NPI DPSI % difference<br />

Access path index only (2285 pages) index only (2302 pages) =<br />

CPU (sec.) 0.759703 0.587190 -23%<br />

Elapsed (sec.) 0.825141 0.668409 -19%<br />

NPI DPSI % difference<br />

Access path index only (2312 pages) index only (2342 pages) =<br />

CPU (sec.) 0.718432 0.657405 -9%<br />

Elapsed (sec.) 0.637515 0.231345 -64%

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

Saved successfully!

Ooh no, something went wrong!