Creating partition-by-growth table spaces
You can create a partition-by-growth table space so that Db2 manages partitions based on data growth and uses segmented space management capabilities within each partition.
About this task
A partition-by-growth (PBG) table space is a universal table space (UTS) that has partitions that Db2 manages automatically based on data growth. It holds data pages for only a single table, and has segmented space management capabilities within each partition.
Db2 manages PBG table spaces automatically as data grows, by automatically adding a new partition when more space is needed to satisfy an insert operation.
PBG table spaces are best used for small or medium sized tables, especially when a table does not have a suitable partitioning key. Partition-by-growth table spaces can grow up to 128 TB, depending on the buffer pool page size used, and the MAXPARTITIONS and DSSIZE values specified when the table space is created.
Any index created on a table in a PBG table space must be a non-partitioned index. That is, partitioned indexes, including partitioning indexes and data-partitioned secondary indexes (DPSIs) are not supported on table in PBG table spaces. For more information, see Indexes on partitioned tables.
- Insert and query performance degradation, which is perhaps the most important factor suggesting that conversion is required. Such performance degradation can have many causes, but for large tables in PBG tables spaces, the size of the table space is often one of the major causes.
- Difficulty regaining clustering of the data (which requires a REORG of the entire table space).
- Problems associated with very large non-partitioned indexes, because partitioned (partitioning and DPSI) indexes are not supported for tables in PBG table spaces. For more information, see
- Lack of partition parallelism support for utilities.
- Limited support for partition-level utility operations.
If you encounter these issues, consider using partition-by-range (PBR) table spaces instead.
The partitioned structure supports partition-level utility operations and parallelism capabilities. A PBG table space also has segmented organization and segmented space management capabilities within each partition. The segmented structure provides better space management and mass delete capabilities.
Procedure
To create a partition-by-growth table space, use one of the following approaches: