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

Grammar Railroad diagram

  1. ShowStatusFromReadwriteSplittingRule ::=
  2. 'SHOW' 'STATUS' 'FROM' 'READWRITE_SPLITTING' ('RULES' | 'RULE' groupName) ('FROM' databaseName)?
  3. groupName ::=
  4. identifier
  5. databaseName ::=
  6. 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

ColumnsDescription
resourcestorage unit name
statusstorage unit status
delay_time(ms)delay time

Example

  • Query readwrite splitting storage unit status for specified readwrite splitting rule in specified database.
  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)
  • Query all readwrite splitting storage unit from specified database
  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)
  • Query readwrite splitting storage unit status for specified readwrite splitting rule in current database
  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)
  • Query all readwrite splitting storage unit from current database
  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)

Reserved word

SHOW, STATUS, FROM, READWRITE_SPLITTING, RULE, RULES