Stores

Set store defaults, or choose a log store or memory store to determine how data from a window is saved.

Every window is assigned to a store, which holds the retained records. By default, all windows are assigned to a memory store. Additional stores can be created to add data recoverability and to optimize performance. Windows can then be assigned to specific stores.

You can also create a default store explicitly with the CREATE DEFAULT MEMORY STORE and CREATE DEFAULT LOG STORE statements. By stipulating default store settings you can determine store types and locations in the event that you do not assign new windows to specific store types.

Log Stores

The log store holds all data in memory, but also logs all data to the disk, meaning it guarantees data state recovery in the event of a failure. Use a log store to be able to recover the state of a window after a restart.

Log stores are created using the CREATE LOG STORE statement. You can set a log store as the default store using the CREATE DEFAULT LOG STORE statement, which overrides the default memory store.

Memory Stores

A memory store holds all data in memory. Memory stores retain the state of queries for a project from the most recent server start-up for as long as the project is running. Because query state is retained in memory rather than on disk, access to a memory store is faster than to a log store.

Memory stores are created using the CREATE MEMORY STORE statement. If no default store is defined, new windows are assigned to a memory store automatically. You can use either of the relevant statements shown above to determine specific memory store behavior and set default store settings.