SHOW DATABASE STATUS
On this page
Shows SingleStore Helios database status.
Syntax
[USING db_name] SHOW DATABASE STATUS
Remarks
-
In case of workspace replication, the viewpoints of the primary and secondary workspaces may differ.
In this case, the primary workspace is unaware of the secondary workspace, whereas the secondary workspace is aware of the primary workspace. Hence, the command may return different results when run. -
See the Permission Matrix for the required permission.
The following table provides information on the metrics displayed in the output:
Key |
Description |
---|---|
database |
Name of the database in the SingleStore Helios instance |
role |
Database replication role |
state |
Current state of the database (See Database States for more information) |
commit_ |
Number of committed transactions. |
provision_ |
Position (of the snapshot) from which the database has been provisioned |
oldest_ |
Position of the oldest available snapshot (for the database) on the disk |
newest_ |
Position of the most recent snapshot (for the database) on the disk |
log_ |
Durability type of the log, sequential or paged |
commit_ |
Position before which all pages are committed |
hardened_ |
Position before which all pages have been written |
replay_ |
Position before which all pages have been replayed. |
tail_ |
Highest position of all the pages |
replicated_ |
Position before which all commits are replicated to the secondary databases |
term |
The term of the database, used to uniquely identify which node was the master of a specific database |
replay_ |
Used in combination with |
sync_ |
This field is deprecated |
state_ |
Provides the current stage of the replication state machine |
state_ |
Provides the error associated with the replication state machine |
state_ |
Provides the current state of the replication state machine |
replay_ |
Specifies if the replay is stalling because of low memory |
replay_ |
Specifies if the replay is stalling because of low blob cache space |
replay_ |
Used in combination with |
network_ |
Used in combination with |
network_ |
Used in combination with |
is_ |
Specifies if the secondary partition is connected to the primary partition |
replication_ |
Specifies the replication type ( |
master_ |
The host component (of the primary database) in the |
master_ |
The port component (of the primary database) in the |
master_ |
Name of the user |
master_ |
The name of the primary database |
auto_ |
This field is deprecated |
partitions |
The number of partitions. |
gv_ |
Represents the current timestamp of the server's logical clock. |
Note: LSN stands for Log Sequence Number, and represents the position in the log file.
Examples
The following example shows the output when the command is run on the primary workspace.
USE memsql_demo;SHOW DATABASE STATUS;+--------------------------+--------+| Key | Value |+--------------------------+--------+| database | x_db || role | master || state | online || commit_count | 0 || provision_file | 0 || oldest_living_snapshot | 0 || newest_snapshot | 0 || log_type | paged || commit_lsn | 0:2 || hardened_lsn | 0:2 || replay_lsn | 0:0 || tail_lsn | 0:2 || replicated_committed_lsn | 0:1 || term | 2 || workload_throttled | no || partitions | 6 |+--------------------------+--------+
The following example displays the output from the secondary workspace’s viewpoint.
USE memsql_demo;SHOW DATABASE STATUS;+----------------------------+-------------+| Key | Value |+----------------------------+-------------+| database | x_db || role | replica || state | replicating || commit_count | 0 || provision_file | 0 || oldest_living_snapshot | 0 || newest_snapshot | 0 || log_type | paged || commit_lsn | 0:1 || hardened_lsn | 0:2 || replay_lsn | 0:1 || tail_lsn | 0:2 || replicated_committed_lsn | 0:0 || term | 2 || is_connected_to_master | yes || replication_type | async || master_host | 127.0.0.1 || master_port | 10000 || master_user | distributed || master_database | x_db || state_machine_stage | packet wait || state_machine_state | x_streaming || state_machine_error | no || state_machine_throttling | no || replay_stuck_on_low_memory | no || partitions | 6 |+----------------------------+-------------+
Last modified: January 30, 2023