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.

Figure 2-10 DPSIs versus NPSIs<br />

Figure 2-10 explains the difference between DPSI and NPSI <strong>for</strong> a table with two<br />

partitions.<br />

CREATE TABLE T<br />

(YEAR,COUNTRY,TYPE,...)<br />

PARTITION BY YEAR<br />

PARTITION 1 ENDING 2005<br />

PARTITION 2 ENDING 2006<br />

CREATE INDEX NPSI<br />

ON T (TYPE ASC)<br />

CLUSTER<br />

CREATE INDEX DPSI<br />

ON T (COUNTRY ASC)<br />

PARTITIONED<br />

Pros: Full partition independence:<br />

parallel utilities (REORG, LOAD, RECOVER)<br />

partition scope operations (add, rotate, reset)<br />

data affinity in data sharing<br />

potentially more efficient partitions pruning<br />

No BUILD2 phase in online REORG if DPSI-only<br />

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

Table T<br />

DPSI<br />

2005 BH 1 ...<br />

NPSI<br />

2005<br />

2005<br />

DE<br />

AU<br />

1<br />

2<br />

...<br />

...<br />

AU<br />

BH<br />

1 2005 AU 3 ... DE<br />

2 2005 DE 4 ...<br />

3<br />

4<br />

2006<br />

2006<br />

2006<br />

2006<br />

2006<br />

DE<br />

DE<br />

BH<br />

AU<br />

BH<br />

2<br />

3<br />

3<br />

3<br />

4<br />

...<br />

...<br />

...<br />

...<br />

...<br />

AU<br />

BH<br />

DE<br />

Cons: Multiple index traversals <strong>for</strong><br />

queries without pruning option

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

Saved successfully!

Ooh no, something went wrong!