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.

the PARTITION BY clause in the CREATE TABLE statement. Since the partitioning index is<br />

no longer required, another index may also be used as a clustering index.<br />

Remember that index-controlled partitioning is still supported in <strong>DB2</strong> V8 but several new<br />

enhancements are only supported when using table-controlled partitioning.<br />

We now review index terminology and classification.<br />

Indexes on table-controlled partitioned tables can be classified as follows:<br />

► Based on whether or not an index is physically partitioned:<br />

– Partitioned index: The index is made up of multiple physical partitions (not just index<br />

pieces)<br />

– Non-partitioned index: The index is a single physical data set (or multiple pieces)<br />

► Based on whether or not the columns in the index correlate with the partitioning columns<br />

of the table (the left most partitioning columns of the index are those specified in the<br />

PARTITION BY clause of the table):<br />

– Partitioning index: The columns in the index are the same as (and have the same<br />

collating sequence), or start with the columns in the PARTITION BY clause of the<br />

CREATE TABLE statement.<br />

– Secondary index: Any index in which the columns do not coincide with the partitioning<br />

columns of the table.<br />

– Data-partitioned secondary indexes: Any index defined with the PARTITIONED option<br />

(see later).<br />

► Based on whether or not the index determines the clustering of the data. Note that when<br />

using table-controlled partitioning:<br />

– Clustering index: The index determines the order in which the rows are stored in the<br />

partitioned table.<br />

– Non-clustering index: The index does not determine the data order in the partitioned<br />

table.<br />

5.5.1 Partitioned table space without index<br />

5.5.2 Clustering index<br />

Because the table definition of a table-controlled partitioned table is complete after executing<br />

the CREATE TABLE statement, no partitioning index is required. So you can have a<br />

table-controlled partitioned table without a partitioning index. Due to the non-unique nature of<br />

DPSIs it is advised to specify predicates on partitioning key columns in order to enable<br />

partition pruning from queries using predicates <strong>for</strong> DPSI columns.<br />

In <strong>DB2</strong> V8, any index on a table-controlled partitioned table can be the clustering index,<br />

including a secondary index. If predicates used to access the table controlled partitioned table<br />

do not refer to the partitioning columns, a clustering index can now be defined <strong>for</strong> these<br />

predicates.<br />

5.5.3 Clustering index always<br />

If no explicit clustering index is specified <strong>for</strong> a table, the V8 REORG utility recognizes the first<br />

index created on each table as the implicit clustering index when ordering data rows.<br />

Chapter 5. Availability and capacity enhancements 247

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

Saved successfully!

Ooh no, something went wrong!