Product Solutions Support
Try MemSQL

SNAPSHOT DATABASE

Info

This command is not supported in MemSQL Cloud.

Takes a snapshot of the given database and truncates the transaction log.

During normal operation, MemSQL logs writes and DDL commands to transaction log files. Periodically, a compact snapshot of the entire database is written out to disk and the logs are truncated. This command allows you to force a snapshot operation on the given database across all partitions in the cluster.

SNAPSHOT DATABASE is primarily useful to compact the logs to enable faster recovery if the MemSQL service is restarted. There are two situations in which we would typically recommend performing a manual SNAPSHOT on a database:

Syntax

SNAPSHOT [DATABASE] <db_name>

Notes

Example

memsql> snapshot database foo;
Query OK, 0 rows affected (45.36 sec)
Was this article useful?