WorkspaceDataSnapshot

The WorkspaceDataSnapshot table has identical columns to WorkspaceData but contains periodically captured snapshots representing only the most recent active entries. This is used internally to improve the startup performance of web user interface sessions. It is updated by an optional Persistent Query called WorkspaceSnapshot; by default this runs every night. If WorkspaceDataSnapshot is not present or is empty, the web server will still function but may take longer to start user sessions.

For administrative details, see Creating Workspace Data Snapshots.

Caution

If you're deleting old WorkspaceDataSnapshot data, it is important to keep at least the most recent partition at all times. This data is written to historical partitions instead of intraday so it's not important to delete it, and merging is not required.

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 entry's owner.
NameStringThe entry's name.
IdStringA system-assigned identifier that uniquely identifies this entry.
VersionintThe version of this entry.
DataTypeStringThe system-assigned data type for the saved data such as Dashboard or Workspace.
DataStringThe saved data.
StatusStringThe status, which indicates whether the entry is active or deleted.
AdminGroupsString[]The groups which are allowed to administer this entry.
ViewerGroupsString[]The groups which are allowed to view this entry.
LastModifiedByAuthenticatedStringThe authenticated user (e.g., the user who logged in via password, SAML, etc.) who created this row.
LastModifiedByEffectiveStringThe effective user (e.g., the "operate as" user if the authenticated user is using the "operate as" option) who created this row.
LastModifiedTimeDateTimeThe date and time when this row was created.

Creating Workspace Data Snapshots

Deephaven's web console relies on the WorkspaceData table within the DbInternal namespace for persistent state storage. This table incrementally grows with each user workspace update and is 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 this table.

Snapshots should be created 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 if either of the criteria are met.

PropertyDescriptionDefault Value
WorkspaceDataSnapshot.daysSinceLastSnapshotThresholdDays since the last snapshot was created7
WorkspaceDataSnapshot.changesToSnapshotSizeRatioThresholdRatio of changed rows since the last snapshot0.2 (20% new)