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.

merge joins and work file usage. <strong>DB2</strong> V8 enhancements introduce support <strong>for</strong> in-memory<br />

work files and sparse indexes <strong>for</strong> work files to meet this challenge.<br />

► Efficient access of the fact table:<br />

Due to the generation of arbitrary (or unrelated) key ranges from the cartesian process,<br />

the fact table must minimize unnecessary probes and provide the greatest level of<br />

matching index columns based on the pre-joined dimensions.<br />

Of course, the very first step is determine if the query qualifies <strong>for</strong> a star join. You can refer to<br />

the white paper The Evolution of Star Join Optimization available from the Web site:<br />

http://www.ibm.com/software/data/db2/os390/techdocs/starjoin.pdf<br />

Star join per<strong>for</strong>mance characteristics<br />

Star join characteristics are:<br />

► Snowflakes are common <strong>for</strong> star join queries.<br />

► Snowflakes are generally materialized.<br />

► Snowflake work files could not have indexes defined on them be<strong>for</strong>e the implementation of<br />

sparse index in V7.<br />

► Sort merge join is usually chosen to join the snowflake to the fact table composite; this can<br />

be relatively inefficient.<br />

► Sorting a large intermediate result (composite table) including a join to the fact table (no<br />

index) is expensive.<br />

The result of outside-in processing (the star join itself) is a composite table (the composite<br />

result of previous operations. It needs to be sorted in join column sequence if sort merge<br />

join is used (very likely) during inside out processing.<br />

► Sorting the large intermediate result <strong>for</strong>ces the parallel group to merge (less parallelism).<br />

3.3.2 In memory work file<br />

<strong>DB2</strong> V8 supports in memory work files (IMWF) <strong>for</strong> star join queries. This means the normal<br />

work file database is not used. The complete work file is stored in memory instead.<br />

Figure 3-16 shows the utilization of IMWF to improve the per<strong>for</strong>mance of star join.<br />

56 <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>

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

Saved successfully!

Ooh no, something went wrong!