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.

Using the InfoCube query example in Figure 10-8, we use the described method<br />

to break down the query and determine the requirements <strong>for</strong> indexing and<br />

statistics collection to ensure that the optimal access path is chosen. Without first<br />

breaking down and simplifying the query, it is not possible to adequately<br />

understand these requirements.<br />

Infocube Query Example<br />

SELECT "S____637" , "S____566" , "S____581" , "S____561" , "S____565", "S____574" , "1ROWCOUNT" , "Z_BQ" , "Z_CNFCST" ,<br />

"Z_COMMQ" , "Z_FCBP" , "Z_FCMK" , "Z_FCSLN" , "Z_NSQ" , "Z_RBQ" FROM ( SELECT "D5"."SID_Z_DOCTYP" AS "S___637"<br />

,"X1"."S__Z_PROTIND" AS "S____566" ,"D6"."SID_Z_FACTWK" AS "S____581" ,"X2"."S__Z_BTGRPNO" AS<br />

"S____561","X1"."S__Z_MODEL" AS "S____565" ,"X1"."S__Z_MAJCAT" AS "S____574" , COUNT( * ) AS "1ROWCOUNT" , SUM (<br />

"F"."/<strong>BI</strong>C/Z_BQ" ) AS "Z_BQ" , SUM ("F"."/<strong>BI</strong>C/Z_CNFCST" ) AS "Z_CNFCST" , SUM ( "F"."/<strong>BI</strong>C/Z_COMMQ" ) AS "Z_COMMQ" , SUM (<br />

"F"."/<strong>BI</strong>C/Z_FCBP" ) AS "Z_FCBP" , SUM ("F"."/<strong>BI</strong>C/Z_FCMK" ) AS "Z_FCMK" , SUM ( "F"."/<strong>BI</strong>C/Z_FCSLN" ) AS "Z_FCSLN" , SUM (<br />

"F"."/<strong>BI</strong>C/Z_NSQ" ) AS "Z_NSQ" , SUM ("F"."/<strong>BI</strong>C/Z_RBQ" ) AS "Z_RBQ"<br />

FROM "/<strong>BI</strong>C/FZIC_SFC" "F" ,"/<strong>BI</strong>C/DZIC_SFC5" "D5" ,"/<strong>BI</strong>C/DZIC_SFC3" "D3" ,"/<strong>BI</strong>C/XZ_PRODCD" "X1" ,"/<strong>BI</strong>C/DZIC_SFC6" "D6"<br />

,"/<strong>BI</strong>C/DZIC_SFC1" "D1" ,"/<strong>BI</strong>C/XZ_SHIPTO" "X2" ,"/<strong>BI</strong>C/DZIC_SFCP" "DP" ,"/<strong>BI</strong>0/0600000005" "Z1"<br />

WHERE "F"."KEY_ZIC_SFC5" = "D5"."DIMID"<br />

AND "F"."KEY_ZIC_SFC3" ="D3"."DIMID"<br />

AND "D3"."SID_Z_PRODCD" = "X1"."SID"<br />

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

AND "F"."KEY_ZIC_SFC1" = "D1"."DIMID"<br />

AND "D1"."SID_Z_SHIPTO" = "X2"."SID"<br />

AND "F"."KEY_ZIC_SFCP" = "DP"."DIMID"<br />

AND "X2"."S__Z_BTGRPNO" = "Z1"."SID"<br />

AND (((( "DP"."SID_0RECORDTP" = 0 )) AND (( "DP"."SID_0REQUID"

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

Saved successfully!

Ooh no, something went wrong!