The following partitioning expression is recommended for a transaction-time table, where ttcolumn represents the transaction-time column.
PARTITION BY CASE_N (END(ttcolumn) >= CURRENT_TIMESTAMP, NO CASE)
By using the recommended physical partitioning for a transaction-time table, the physical partitions are as follows:
- The current partition has rows that are or were open as of the last resolved CURRENT_TIMESTAMP value for the partitioning expression.
- The history partition has rows that were closed as of the last resolved CURRENT_TIMESTAMP value for the partitioning expression.