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.

7.4.2 Choosing and changing the clustering index<br />

The clustering index determines the order in which rows are stored in a table. It<br />

is defined with the CLUSTER keyword on the CREATE INDEX statement. The<br />

clustering index is also the clustering key. There can only be one clustering index<br />

on a table.<br />

By default, in <strong>SAP</strong>, the primary index is always the clustering index. However,<br />

depending on specific customer situations, this is not always the best choice <strong>for</strong><br />

the clustering index. This is especially true <strong>for</strong> DataStore objects.<br />

To optimize the query per<strong>for</strong>mance on DataStore objects, you should consider<br />

explicitly defining a clustering index. Choosing the clustering index is similar to<br />

choosing the partitioning key — you need to understand your data and know how<br />

it is used. You should focus on how the data is commonly retrieved.<br />

If there are queries that access a table index sequentially through an index that is<br />

not defined as clustering, and if this is a predominant way that the table is<br />

accessed, then the per<strong>for</strong>mance can be improved by specifying this index as<br />

clustering. Index-sequential access occurs in most cases <strong>for</strong> the range<br />

predicates (BETWEEN, >,

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

Saved successfully!

Ooh no, something went wrong!