ServiceNow, Inc.
Efficient database table rotation and upgrade
Last updated:
Abstract:
A database server may include a master table schema that defines a database table's configuration and an arrangement for corresponding shadow tables. The shadow tables contain data related to contiguous and non-overlapping time periods and writing to the shadow tables occurs in a rotational fashion so that only one active table is written to at any point. The server may upgrade the master table schema. The server then may determine that a rotation event has occurred where a first shadow table is active and a second shadow table is associated with an oldest of the contiguous and non-overlapping time periods. In response, the server may delete data in the second table, determine that the schema has been upgraded since the second table was most recently active, upgrade the second table's schema to match the schema, and set the second table to active enabling writing to the second table.
Utility
17 Jan 2019
21 Sep 2021