Database rotation
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.
| Functionality | Tables applied to |
|---|---|
| Table Rotation | syslog
|
| Table Extension |
|
Table rotation and extension
The Table Rotations module allows you to define a new table rotation, a new table extension, a new table shard, or modify an existing one. You can access a list of table rotations on your instance by navigating to
- 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.