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.

Column Local<br />

or join<br />

CALMONTH Local BETWEEN Yes 5 Optional<br />

The mandatory columns to support the join and the majority of the filtering are<br />

the join predicates (if you recall, the local predicates filtered from 7 million to 1<br />

million rows, but the join predicates filtered down to 8 rows). All local predicates,<br />

there<strong>for</strong>e, are listed as optional.<br />

CALMONTH is a strong candidate to be the partitioning column. This provides<br />

many benefits <strong>for</strong> maintenance (REORG, backup, and so on, only required on<br />

the most recent partitions, as older partitions do not change over time), and also<br />

<strong>for</strong> exploitation by other queries without the column required in the index (with<br />

<strong>DB2</strong> table controlled partitioning).<br />

CURTYPE has only two possible values, which makes this a relatively poor index<br />

choice, but it could be a good partitioning candidate (preceding CALMONTH) to<br />

add greater granularity of each partition if required. CURTYPE should only be<br />

added to the index, or as a partitioning column, if an equals predicate always<br />

exists in queries against the DSO.<br />

ACCT_ASGN is also not a strong filtering column, and has the disadvantage of<br />

an IN list rather than equal predicate coded against it. IN list predicates are not<br />

preferred <strong>for</strong> index matching <strong>for</strong> lower cluster ratio indexes (less than 80%)<br />

because list prefetch cannot be exploited with matching IN list access. There<strong>for</strong>e,<br />

this column may not be a good choice <strong>for</strong> indexing unless the column is always<br />

existing in queries and the column belongs to a high cluster ratio index.<br />

The index recommendations <strong>for</strong> table /<strong>BI</strong>C/AZ<strong>OS</strong>ASALE00 are shown in<br />

Table 10-3.<br />

Table 10-3 Index recommendation<br />

Column Reason<br />

Operator Partition<br />

candidate<br />

222 <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 />

Index<br />

column<br />

sequence<br />

Mandatory/optional<br />

CURTYPE Only if local predicate always exists in queries, and column is not<br />

chosen as a partitioning column<br />

ACCT_ASGN Only if local predicate always exists in queries, and index provides<br />

good clustering<br />

/<strong>BI</strong>C/ZMATLPLNT To support join filtering<br />

PLANT To support join filtering<br />

CALMONTH Only if not chosen as partitioning column

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

Saved successfully!

Ooh no, something went wrong!