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.

|is the last matching predicate. Apply left to right against index |<br />

|columns, skipping no columns in the L-R sequence. <strong>DB2</strong> may "screen"|<br />

|remaining Stage 1 preds against the rid list be<strong>for</strong>e data access. |<br />

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

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

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

|On composite (multi-column) indexes, collect correlated key stats |<br />

|on column pairings, as well as cardinality stats, like 2ndkeycard,|<br />

|3rdkeycard, etc., with Runstats. These additional statistics will |<br />

|allow <strong>DB2</strong> to make better filter estimates <strong>for</strong> Equality and Range |<br />

|and In List predicates, thereby selecting proper indexes and more |<br />

|realistic estimates <strong>for</strong> rows returned from the query (QCARD). |<br />

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

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

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

|Index Screening is now available <strong>for</strong> List Prefetch processing, |<br />

|which allows Random indexes to "screen" additional predicates |<br />

|after matching index scan, and be<strong>for</strong>e data access. |<br />

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

THIS IS AN "INDEX ONLY" ACCESS: NO DATA PAGES ARE READ FROM THE TABLE<br />

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

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

|Collecting Non-uni<strong>for</strong>m column statistics greatly enhance the <strong>DB2</strong> |<br />

|Optimizer accuracy when processing Equals and In (List) preds. |<br />

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

Example C-3 shows the analysis of the query.<br />

Example: C-3 SQL PA query analysis<br />

A JOIN OF 2 TABLES HAS BEEN DETECTED. THIS WAS THE FIRST TABLE ACCESS.<br />

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

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

|Equi-join predicates of unequal length may be handled at stage 1: |<br />

|<strong>DB2</strong> pads out CHAR and VARCHAR column types to accomplish the join.|<br />

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

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

QUERYNO: 100000001 QBLOCKNO: 1 PLANNO: 2 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 />

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

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