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.

5.3.2 Per<strong>for</strong>mance<br />

– Invalidation occurs during ALTER.<br />

► Static BIND does not avoid an index that is in RBDP:<br />

– Indexes in RBDP can still be chosen, and will get a resource unavailable condition at<br />

execution time.<br />

Dynamic partition management<br />

The enhancements related to partitions are:<br />

► Add, rotate, and rebalance partitions<br />

Execute the ALTER TABLE ADD PARTITION statement to add a partition to a partitioned<br />

table space and you are ready to go. You can start inserting/loading rows into the new<br />

partition immediately.<br />

Rotating partitions allows old data to “roll-off” while reusing the partition <strong>for</strong> new data with<br />

the ALTER TABLE ROTATE PARTITION FIRST TO LAST statement. When rotating, you<br />

can specify that all the data rows in the oldest (or logically first) partition are to be deleted,<br />

and then specify a new table space high boundary (limit key) so that the partition<br />

essentially becomes the last logical partition in sequence, ready to hold the data that is<br />

added. The emptied partition is available immediately, no REORG is necessary. Logical<br />

and physical partition numbering is now different. Refer to the columns DSNUM and<br />

LOGICAL_PART in catalog tables SYSTABLEPART and SYSCOPY <strong>for</strong> the actual physical<br />

to logical partition number correspondence. Recover to previous PIT is blocked as<br />

SYSCOPY and SYSLGRNX entries are deleted.<br />

Rebalancing partitions is done by means of the REORG TABLESPACE utility. Specifying<br />

the REBALANCE option when specifying a range of partitions to be reorganized allows<br />

<strong>DB2</strong> to set new partition boundaries <strong>for</strong> those partitions, so that all the rows that<br />

participate in the reorganization are evenly distributed across the reorganized partitions.<br />

However, if the columns used in defining the partition boundaries have many duplicate<br />

values perfect rebalancing may not be possible.<br />

Note that adding and rotating partitions will automatically convert index controlled to table<br />

controlled partitioning.<br />

► Alter partition boundaries<br />

In <strong>DB2</strong> V6, the ability to modify limit keys <strong>for</strong> table partitions was introduced. The<br />

enhancement in <strong>DB2</strong> V8 introduces the same capability <strong>for</strong> table-based partitioning with<br />

the ALTER TABLE ALTER PARTITION ENDING AT statement. The affected data partitions<br />

are placed into Reorg Pending state (REORP) until they have been reorganized.<br />

In this section we describe the online schema per<strong>for</strong>mance measurements.<br />

Per<strong>for</strong>mance measurement description<br />

The environment we used in this measurement:<br />

► z/<strong>OS</strong> V1R3<br />

► <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> V8 in NFM<br />

► <strong>IBM</strong> z900 Series 2064 4-way processor<br />

► ESS 2105-800 with FICON channels<br />

Per<strong>for</strong>mance measurement results<br />

Alter Column Data Types<br />

In a non-partitioned table with 17 columns and 2 indexes the following alters were executed:<br />

Chapter 5. Availability and capacity enhancements 233

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

Saved successfully!

Ooh no, something went wrong!