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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This step involves breaking apart the original query to count the number of rows<br />

retrieved <strong>for</strong> each dimension and master data table independently, and joined to<br />

the central facttable. See Figure 10-13.<br />

Step 3 - Determine the Filtering<br />

SELECT COUNT(*)<br />

FROM "/<strong>BI</strong>C/DZIC_SFC6" "D6"<br />

D6<br />

Shows the filtering<br />

of this predicate<br />

WHERE "D6"."SID_Z_FACTWK" BETWEEN 200327 AND 200352<br />

SELECT COUNT(*)<br />

FROM "/<strong>BI</strong>C/FZIC_SFC" "F" ,"/<strong>BI</strong>C/DZIC_SFC6" "D6"<br />

WHERE "F"."KEY_ZIC_SFC6" = "D6"."DIMID"<br />

AND "D6"."SID_Z_FACTWK" BETWEEN 200327AND 200352<br />

Figure 10-13 Determining the filtering<br />

Shows the effect of<br />

filtering against the fact<br />

table<br />

D6<br />

Count<br />

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

37<br />

F<br />

Count<br />

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

1,317,164<br />

Chapter 10. Tips <strong>for</strong> SQL efficiency 217

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

Saved successfully!

Ooh no, something went wrong!