复古 护眼 海天 深邃 暗黑 默认

SHOW STATUS FROM READWRITE_SPLITTING RULE

描述

SHOW STATUS FROM READWRITE_SPLITTING RULE 语法用于查询指定逻辑库中指定读写分离规则中读写分离存储单元状态。

语法

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

groupName ::=
  identifier

databaseName ::=
  identifier

补充说明

  • 未指定 databaseName 时,默认是当前使用的 DATABASE。 如果也未使用 DATABASE 则会提示 No database selected

返回值说明

说明
storage_unit 存储单元名称
status 存储单元状态

示例

  • 查询指定逻辑库中指定读写分离规则中读写分离存储单元状态
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)
  • 查询指定逻辑库中所有读写分离存储单元状态
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.00 sec)
  • 查询当前逻辑库中指定读写分离规则中读写分离存储单元状态
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)
  • 查询当前逻辑库中所有读写分离存储单元状态
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)

保留字

SHOWSTATUSFROMREADWRITE_SPLITTINGRULERULES

相关链接