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.

C.1 <strong>DB2</strong> SQL PA additional reports<br />

Notice that the index used has a NOT PADDED attribute and a cartesian join was detected.<br />

Example C-1 reports the query definition and also some good news <strong>for</strong> the query.<br />

Example: C-1 SQL PA query description<br />

================================================================================<br />

SQL PA ANALYSIS FOR QUERYNO 100000001<br />

SELECT COUNT(*) FROM<br />

SYS<strong>IBM</strong>.SYSPACKSTMT A, SYS<strong>IBM</strong>.SYSPACKDEP B<br />

WHERE A.LOCATION = ? AND<br />

B.DLOCATION = ? AND<br />

B.DCOLLID = ? AND<br />

A.COLLID ?<br />

QUERYNO: 100000001 QBLOCKNO: 1 PLANNO: 1 MIXOPSEQ: 0<br />

PROCESS -><br />

+------------------------------------------------------------------+<br />

|ANL7002I *** GUIDELINE: |<br />

|This plan step has not selected any Sequential|List Prefetch I/O. |<br />

|If the SQL processes just a few rows that is OK, but if many rows |<br />

|are involved, you can help promote Sequential Detection by both |<br />

|accessing the data in sequential order (presort?) and by binding |<br />

|with Release (Deallocate) to avoid resetting counters at Commit. |<br />

+------------------------------------------------------------------+<br />

+------------------------------------------------------------------+<br />

|ANL7005I *** GOOD NEWS: |<br />

|This SQL features a Unique Index being used to access the table |<br />

|that can avoid Distinct Sorts with Group By and Count Distinct C1.|<br />

|Also, unique index will avoid 4K "in memory table" on Correlated |<br />

|Subquery, considers special access path when used with "=" preds, |<br />

|and may convert Subquery to Join on IN, =ANY or =SOME predicates. |<br />

+------------------------------------------------------------------+<br />

+------------------------------------------------------------------+<br />

|ANL6005I *** NOTE: |<br />

|This statement contains a Built in Column Function: however, it |<br />

|is not being processed at either Stage 1 Retrieval or Sort Time. |<br />

|In general, this means poor per<strong>for</strong>mance, because the column(s) get|<br />

|evaluated only at the end of Stage 2 processing. This might be due|<br />

|to multiple columns used, Group By, not all Stage 1 preds, etc. |<br />

+------------------------------------------------------------------+<br />

Example C-2 provides in<strong>for</strong>mation about the indexes.<br />

Example: C-2 SQL PA index in<strong>for</strong>mation<br />

ACCESS IS VIA THE CLUSTERING (INSERT & LOAD ORDER) INDEX FOR THIS TABLE<br />

+------------------------------------------------------------------+<br />

|ANL5018W *** ALERT: |<br />

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