Database Snapshot


Snapshot is a fixed record of data captured at a specific point in time.

  • created from a SQL SELECT statement
    • like a view
    • returns columns from one or more existing tables
  • is created as a read-only copy of the data that was queried
  • typically used for:
    • used as a way to recover data from the point in time which the snapshot was created
    • can be used to increase performance
      • if data does not change often
      • by taking a complex query and saving the queried data as a snapshot,
        • can then query the snapshot instead of using the complex query for live data
  • snapshot’s creation can be scheduled so that an updated version is created on a periodic basis
  • not all databases support native snapshot creation
    • in this case, a snapshot is simulated by creating a table and copying data into it
    • read permissions are then given to the table to make it behave similarly to a snapshot table