Database rotation
-
- UpdatedAug 3, 2023
- 2 minutes to read
- Vancouver
- Data Management
Database rotation involves managing table size growth and archiving old data.
- Table Rotation works by rotating among a small set of tables, and deleting and reusing the old tables for new data.
- Table Extension works by periodically starting a new table and allowing old tables to be easily archived and removed from the system.
- Table Sharding works by enabling records to be grouped in a single table by document ID.
Table rotation plugins
- Database Rotations Plugin activates Table Rotation and Extension without any tables automatically included (com.snc.db.rotation)
- Database Rotations Default Tables Plugin applies Table Rotation and Extension to specific tables (com.snc.db.rotation_default_tables)
Functionality | Tables applied to |
---|---|
Table Rotation | syslog
|
Table Extension |
|
Table rotation and extension
The System Definition Table Rotation module allows you to define a new table rotation, a new table extension, a new table shard, or modify an existing one.

- Name: auto-generated from table name
- Duration: overall time parameter for function
- Initialized: sets function as active (true) or inactive (false)
- Rotations: number of tables to be created within Duration
- Type: indicates Extension (archiving), Rotation (deletion), or Shard (doc ID) functionality
When you define a new rotation, a schedule is created and new data is subsequently written to one of the tables in the rotation group. You will notice the that the group includes the original table plus a number of additional tables. Be aware that deleting a rotation will delete the additional tables and all the data, therefore the rotation should not be deleted if the data is needed.