Partitioning a system-period temporal table
A system-period temporal table can have its table data divided into multiple partitions. A history table that is associated with a system-period temporal table can also be partitioned.
When versioning is enabled, the following behaviors apply when attaching or detaching a partition to a system-period temporal table:
Attaching partitions
- A single partition, partitioned table can be attached to a system-period temporal table as a partition while versioning is enabled.
- The table attached must have the same column definitions as the system-period temporal table, including the three timestamp columns defined as ROW BEGIN, ROW END, and TRANSACTION START ID.
- The table attached does not require a SYSTEM_TIME period definition.
Detaching partitions
- A partition cannot be detached from a system-period temporal table while versioning is enabled. You can drop versioning and then detach a partition from the base table. The detached partition becomes an independent single partition, partitioned table. Detaching a partition from a history table does not require that you drop versioning.
- A detached partition retains all three timestamp columns (ROW BEGIN, ROW END, and TRANSACTION START ID), but not the SYSTEM_TIME period definition.