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.

Looking at the explanation, we can see that column SEX has COLCARDF of 2. This is a low<br />

COLCARDF. Columns with low cardinality (relative to table cardinality) have significant<br />

opportunity <strong>for</strong> skew, <strong>for</strong> that reason frequencies are desirable. The purpose of this example<br />

is to illustrate it may take two runs of SA to get more robust suggestions if defaults are initially<br />

provided. We obtain the statistics shown in Figure 3-54.<br />

Figure 3-54 Statistical output<br />

To illustrate conflict statistic checking, FULLKEYCARDF has been set to 100,000. The table<br />

cardinality is much lower. Rerunning SA returns a complete recollection. When statistics are<br />

conflicting, the issue is often due to an inconsistent statistics collection approach.<br />

We have observed some customers collecting statistics very aggressively on the indexes, and<br />

not on the tables, or vice versa. When index and table statistics are inconsistent, it can result<br />

in inaccurate estimations of filtering <strong>for</strong> an index, or join size. This can lead to inefficient<br />

access paths. SA can solve this problem quickly by identifying and suggesting recollection of<br />

inconsistent statistics, as shown in Figure 3-55.<br />

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