Reduced contention for inserts to PBG table spaces
Db2 12 introduces a new search algorithm for inserts to partition-by-growth (PBG) table spaces to prevent "hot spots" in a single partition.
Starting in Db2 12, a bidirectional search algorithm is used when an insert to a PBG table space fails to find free space in the initial target partition, which is selected based on the clustering index. That is, the partition to be searched next can be either an ascending or descending partition sequence number. Db2 12 randomly select the search order at run time to avoid creating a “hot spot” in a single partition. When Db2 12 reaches the first physical partition during a descending partition search, it wraps around and looks at the last physical partition next.
Note that when Db2 12 reaches the first physical partition during a descending partition search, it wraps around and looks at the last physical partition next. As a result, when a PBG table space has many empty partitions at the end, the descending cross-partition search algorithm often uses the last physical partitions, and it can sometimes leave many unused empty partitions unused in between the first and last partitions.