Before you start
Table data is partitioned as specified in the PARTITION BY clause of the CREATE TABLE statement. The columns used in this definition are referred to as the table partitioning key columns.
Further description of the feature can be found in "Table partitioning in DB2 9" (developerWorks, May 2006).
Table partitioning offers the following:
- Easy roll-in and roll-out of table data
- Easier administration of large tables
- Flexible index placement
- Improved performance for business intelligence style queries
The following exercises enable you to work with the table partitioning feature and demonstrate the roll-in and roll-out of table data, easier administration of large tables, flexible index placement, and improved performance for business intelligence style queries.
They have been developed to demonstrate one or more tasks found within each of the areas.
The objective of this session is to explore the features and benefits of DB2 9 range partitioning in the following areas:
- Creating range partitioned tables
- Roll-in and roll-out of partitions
- Partitioned table management
- Index management and placement
This tutorial is written for DB2 specialists whose skills and experience are at a beginning to intermediate level. You should have a general familiarity with using the DB2 command line, DB2 administration tools, and a working knowledge of SQL.
To run the examples in this tutorial, you need the following:
- DB2 9 Data Server
- Microsoft® Windows® 2000 or later, and an account with administrator privileges, or Linux® (Validated edition) with root access.
- Make sure the Java Runtime Environment is 1.4.2 or later on your system.
- Refer to the DB2 9 system requirements page to ensure that your hardware meets the requirements.
DB2 9 Express C is available from the above link. For steps on installing DB2, refer to the "DB2 XML Evaluation Guide" (developerWorks, June 2006). Unless the DB2 configuration is altered, DB2 automatically starts after installation.
Use the samples scripts and the data provided in the partition.zip file to demonstrate the concepts in this tutorial. Extract the contents into a sub-directory called scripts (C:\scripts or home/userid/scripts). This directory is referred to simply as stmm_scripts throughout this tutorial. This tutorial assumes that you have used the default directories for the DB2 installation, and all the DB2 exercises are performed by a database administrator ID.



