Partition sent_notifications table using range partitioning (#417233) · Issues · GitLab.org / GitLab · GitLab (original) (raw)

Skip to content

Partition sent_notifications table using range partitioning

See Consider partitioning strategies for sent_notif... (#396802 - closed) for the discussion around this strategy.

Proposal

The reply_key on sent_notifications is currently a random, unique, hexadecimal token that is non-sequential. This should be modified to be sequential, starting with a non-hex byte (i.e. g) and followed by the date in ISO format (2023-07-07). This will allow range partitioning, plus a 'legacy' table containing all values prior to partitioning.

See #396802 (comment 1460818651) and the thread around it for more information on creation of partitions why this key format was selected.

Notes

Edited Mar 05, 2025 by Mario Celi