19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - 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.

Star join access path without a sparse index<br />

Figure 3-17 shows the access path to execute a star join (be<strong>for</strong>e PQ61458, which introduced<br />

the sparse index function also in V7).<br />

100<br />

Time NLJ NLJ Store Fact<br />

Figure 3-17 Star join access path (be<strong>for</strong>e PQ61458)<br />

Characteristics of the star join access path:<br />

► Use of a multi-column fact table index during outside-in phase. Nested-loop join (NLJ) is<br />

used.<br />

► No index on the snowflake work file during the inside-out phase. Sort-merge join (SMJ) is<br />

used.<br />

This process can be efficient if the number of rows in the fact table composite involves a low<br />

number of rows, but can be very expensive <strong>for</strong> a large fact table composite.<br />

Sparse indexes on work files<br />

Figure 3-18 shows the structure of a sparse index on the work file.<br />

The development of sparse indexes on work files in <strong>DB2</strong> V8 improves the per<strong>for</strong>mance of the<br />

star join execution.<br />

58 <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Per<strong>for</strong>mance <strong>Topics</strong><br />

500 15,000,000 600 30,000<br />

SMJ<br />

Prod<br />

SMJ<br />

Custmr ...<br />

Outside-in<br />

phase<br />

Fact table index<br />

(Time,Store,...)<br />

Expensive to sort large<br />

Fact table composite<br />

Inside-out phase<br />

Sort merge join is<br />

used to join<br />

snowflake to Fact<br />

table composites

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

Saved successfully!

Ooh no, something went wrong!