Retro Eye care Haitian Deep Dark Default

SHOW STATUS FROM READWRITE_SPLITTING RULE

Description

The SHOW STATUS FROM READWRITE_SPLITTING RULE syntax is used to query readwrite-splitting storage unit status for specified readwrite-splitting rule in specified database.

Syntax

ShowStatusFromReadwriteSplittingRule ::=
  'SHOW' 'STATUS' 'FROM' 'READWRITE_SPLITTING' ('RULES' | 'RULE' groupName) ('FROM' databaseName)?

groupName ::=
  identifier

databaseName ::=
  identifier

Supplement

  • When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.

Return Value Description

Columns Description
storage_unit storage unit name
status storage unit status

Example

  • Query readwrite-splitting storage unit status for specified readwrite-splitting rule in specified database.
SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0 FROM sharding_db;
mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0 FROM sharding_db;
+--------------+----------+
| storage_unit | status   |
+--------------+----------+
| ds_0         | disabled |
+--------------+----------+
1 rows in set (0.01 sec)
  • Query all readwrite-splitting storage unit from specified database
SHOW STATUS FROM READWRITE_SPLITTING RULES FROM sharding_db;
mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES FROM sharding_db;
+--------------+----------+
| storage_unit | status   |
+--------------+----------+
| ds_0         | disabled |
+--------------+----------+
1 rows in set (0.01 sec)
  • Query readwrite-splitting storage unit status for specified readwrite-splitting rule in current database
SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0;
mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0;
+--------------+----------+
| storage_unit | status   |
+--------------+----------+
| ds_0         | disabled |
+--------------+----------+
1 rows in set (0.01 sec)
  • Query all readwrite-splitting storage unit from current database
mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
+--------------+----------+
| storage_unit | status   |
+--------------+----------+
| ds_0         | disabled |
+--------------+----------+
1 rows in set (0.01 sec)

Reserved word

SHOW, STATUS, FROM, READWRITE_SPLITTING, RULE, RULES