07.02.2013 Views

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

Best Practices for SAP BI using DB2 9 for z/OS - 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.

Figure 10-14 Comparing filtering<br />

The counts in Figure 10-14 demonstrate that filtering of local predicates on the<br />

D6 table (37 rows), and combined D6 to F table (1,317,164 rows).<br />

This step is repeated <strong>for</strong> each set of dimension/snowflakes independently and<br />

joined with the facttable. These counts will be used to compare all filtering<br />

combinations.<br />

Step 4 - Compare Filtering<br />

Join Count with Table CARDF % Rows<br />

Sequence Filtering<br />

Returned<br />

Z1<br />

Z1-X2<br />

Z1-X2-D1<br />

Z1-X2-D1-F<br />

X1<br />

X1-D3<br />

X1-D3-F<br />

DP<br />

DP-F<br />

D5<br />

D5-F<br />

13<br />

26,514<br />

171,787<br />

1,702,101<br />

258<br />

281<br />

511,179<br />

432<br />

10,743,216<br />

598<br />

10,743,216<br />

13<br />

353,413<br />

1,565,004<br />

10,743,216<br />

43,511<br />

30,932<br />

10,743,216<br />

432<br />

10,743,216<br />

598<br />

10,743,216<br />

100%<br />

} 7.50%<br />

10.98%<br />

15.84%<br />

0.59%<br />

0.26%<br />

4.76% }<br />

100%<br />

100% }}<br />

100%<br />

100%<br />

D6 37 423 8.75%<br />

D6-F 1,317,164 10,743,216 12.26%<br />

The original facttable contains 10,743,216 rows.<br />

Comparing the filtering provided by each dimension/snowflake joined to the fact,<br />

we can see in Figure 10-14 that neither DP nor D5 provide any filtering (because<br />

the count of join to the fact equals the count of the fact only). The snowflake<br />

containing D3 provides the strongest filtering, followed by the dimension D6, and<br />

the snowflake containing D1.<br />

There<strong>for</strong>e, if the current access path does not involve the strongest filtering<br />

dimension (D3, accessed be<strong>for</strong>e the facttable), then the access path may be<br />

suboptimal.<br />

If the access path does not reflect the filtering as outlined by the counts, then the<br />

first step is to analyze the statistics and ensure that RUNSTATS was run. (This<br />

may seem like an obvious suggestion, but it is surprising how often RUNSTATS<br />

218 <strong>Best</strong> <strong>Practices</strong> <strong>for</strong> <strong>SAP</strong> <strong>BI</strong> <strong>using</strong> <strong>DB2</strong> 9 <strong>for</strong> z/<strong>OS</strong><br />

}<br />

#3<br />

#1<br />

No Filtering<br />

No Filtering<br />

#2

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

Saved successfully!

Ooh no, something went wrong!