SHOW STATUS FROM READWRITE_SPLITTING RULE

描述

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

语法

语法 铁路图

  1. ShowStatusFromReadwriteSplittingRule ::=
  2. 'SHOW' 'STATUS' 'FROM' 'READWRITE_SPLITTING' ('RULES' | 'RULE' groupName) ('FROM' databaseName)?
  3. groupName ::=
  4. identifier
  5. databaseName ::=
  6. identifier

补充说明

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

返回值说明

说明
resource存储单元名称
status存储单元状态
delay_time(ms)延迟时间

示例

  • 查询指定逻辑库中指定读写分离规则中读写分离存储单元状态
  1. SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0 FROM sharding_db;
  1. mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0 FROM sharding_db;
  2. +----------+---------+----------------+
  3. | resource | status | delay_time(ms) |
  4. +----------+---------+----------------+
  5. | ds_0 | enabled | 0 |
  6. | ds_1 | enabled | 0 |
  7. | ds_2 | enabled | 0 |
  8. | ds_3 | enabled | 0 |
  9. +----------+---------+----------------+
  10. 4 rows in set (0.01 sec)
  • 查询指定逻辑库中所有读写分离存储单元状态
  1. SHOW STATUS FROM READWRITE_SPLITTING RULES FROM sharding_db;
  1. mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES FROM sharding_db;
  2. +----------+---------+----------------+
  3. | resource | status | delay_time(ms) |
  4. +----------+---------+----------------+
  5. | ds_0 | enabled | 0 |
  6. | ds_1 | enabled | 0 |
  7. | ds_2 | enabled | 0 |
  8. | ds_3 | enabled | 0 |
  9. +----------+---------+----------------+
  10. 4 rows in set (0.00 sec)
  • 查询当前逻辑库中指定读写分离规则中读写分离存储单元状态
  1. SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0;
  1. mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0;
  2. +----------+---------+----------------+
  3. | resource | status | delay_time(ms) |
  4. +----------+---------+----------------+
  5. | ds_0 | enabled | 0 |
  6. | ds_1 | enabled | 0 |
  7. | ds_2 | enabled | 0 |
  8. | ds_3 | enabled | 0 |
  9. +----------+---------+----------------+
  10. 4 rows in set (0.01 sec)
  • 查询当前逻辑库中所有读写分离存储单元状态
  1. mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
  1. mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
  2. +----------+---------+----------------+
  3. | resource | status | delay_time(ms) |
  4. +----------+---------+----------------+
  5. | ds_0 | enabled | 0 |
  6. | ds_1 | enabled | 0 |
  7. | ds_2 | enabled | 0 |
  8. | ds_3 | enabled | 0 |
  9. +----------+---------+----------------+
  10. 4 rows in set (0.01 sec)

保留字

SHOWSTATUSFROMREADWRITE_SPLITTINGRULERULES

相关链接