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
。列 | 说明 |
---|---|
resource | 存储单元名称 |
status | 存储单元状态 |
delay_time(ms) | 延迟时间 |
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;
+----------+---------+----------------+
| resource | status | delay_time(ms) |
+----------+---------+----------------+
| ds_0 | enabled | 0 |
| ds_1 | enabled | 0 |
| ds_2 | enabled | 0 |
| ds_3 | enabled | 0 |
+----------+---------+----------------+
4 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;
+----------+---------+----------------+
| resource | status | delay_time(ms) |
+----------+---------+----------------+
| ds_0 | enabled | 0 |
| ds_1 | enabled | 0 |
| ds_2 | enabled | 0 |
| ds_3 | enabled | 0 |
+----------+---------+----------------+
4 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;
+----------+---------+----------------+
| resource | status | delay_time(ms) |
+----------+---------+----------------+
| ds_0 | enabled | 0 |
| ds_1 | enabled | 0 |
| ds_2 | enabled | 0 |
| ds_3 | enabled | 0 |
+----------+---------+----------------+
4 rows in set (0.01 sec)
mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
+----------+---------+----------------+
| resource | status | delay_time(ms) |
+----------+---------+----------------+
| ds_0 | enabled | 0 |
| ds_1 | enabled | 0 |
| ds_2 | enabled | 0 |
| ds_3 | enabled | 0 |
+----------+---------+----------------+
4 rows in set (0.01 sec)
SHOW
、STATUS
、FROM
、READWRITE_SPLITTING
、RULE
、RULES