WorkspaceDataSnapshot

The WorkspaceDataSnapshot table has identical columns to WorkspaceData but contains periodically captured snapshots representing only "active" items where the primary table contains all historical versions of all items. This is used internally to improve the startup performance of web user interface sessions. It is updated by an optional periodic query and may be empty without harm. For administrative details, see the Workspace Data Key Frames section below.

Columns

Column NameColumn TypeDescription
DateStringThe date on which the row was generated (as defined by the LastModifiedTime column value). This is the partitioning column.
OwnerStringThe workspace owner.
NameStringThe workspace name.
IdStringA system-assigned identifier that uniquely identifies this workspace.
VersionintThe workspace version.
DataTypeStringThe system-assigned data type for the saved data.
DataStringThe saved workspace data.
StatusStringThe status, which indicates whether it is for an active or deleted workspace.
AdminGroupsString[]The groups which are allowed to administer this entry.
ViewerGroupsString[]The groups which are allowed to view this entry.
LastModifiedByAuthenticatedStringThe authenticated user who created this row.
LastModifiedByEffectiveStringThe effective user who created this row.
LastModifiedTimeDateTimeThe date and time when this row was created.

Workspace Data Key Frames

Deephaven's web console relies on tables within the DbInternal namespace for persistent state storage. These tables incrementally grow with each user workspace update and are re-scanned whenever the WebClientData query restarts. Over time, this cumulative growth and re-scanning can consume significant resources. To mitigate this, Deephaven provides a snapshot facility specifically for these workspace data tables.

Snapshots should be recorded periodically. The system is designed for daily execution and creates a new snapshot only if there are sufficient changes or enough time has elapsed since the last one. By default, the WorkspaceSnapshot persistent query (PQ) runs daily and attempts to create a new snapshot if conditions warrant. Alternatively, the following console command, executed in a merge server session, also triggers a snapshot attempt. The updateSnapshot() function returns true if a new snapshot is created, and false otherwise.

wws = new com.illumon.iris.utils.WriteableWorkspaceSnapshot(log,db)
wws.updateSnapshot()

The internal logic steps are logged to the ProcessEventLog with LogEntry strings beginning with loadLatestSnapshot and updateSnapshot.

The following configuration parameters control the frequency of snapshot recording. A new snapshot is recorded only if at least one of the criteria are met.

WorkspaceDataSnapshot.daysSinceLastSnapshotThreshold  # default 7
WorkspaceDataSnapshot.changesToSnapshotSizeRatioThreshold # default 0.2 (20% new)