SHOW TRAFFIC RULE
Description
The SHOW TRAFFIC RULE
syntax is used to query specified dual routing rule.
Syntax
Grammar Railroad diagram
ShowTrafficRule ::=
'SHOW' 'TRAFFIC' ('RULES' | 'RULE' ruleName)?
ruleName ::=
identifier
Supplement
- When
ruleName
not specified, the default is show all traffic rules
Return Value Description
Column | Description |
---|---|
name | traffic rule name |
labels | compute node labels |
algorithm_type | traffic algorithm type |
algorithm_props | traffic algorithn properties |
load_balancer_type | load balancer type |
load_balancer_props | load balancer properties |
Example
- Query specified traffic rule
SHOW TRAFFIC RULE sql_match_traffic;
mysql> SHOW TRAFFIC RULE sql_match_traffic;
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| name | labels | algorithm_type | algorithm_props | load_balancer_type | load_balancer_props |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| sql_match_traffic | OLTP | SQL_MATCH | sql=SELECT * FROM t_order WHERE order_id = 1; UPDATE t_order SET order_id = 5; | RANDOM | |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
1 row in set (0.00 sec)
- Query all traffic rules
SHOW TRAFFIC RULES;
mysql> SHOW TRAFFIC RULES;
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| name | labels | algorithm_type | algorithm_props | load_balancer_type | load_balancer_props |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
| sql_match_traffic | OLTP | SQL_MATCH | sql=SELECT * FROM t_order WHERE order_id = 1; UPDATE t_order SET order_id = 5; | RANDOM | |
+-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
1 row in set (0.04 sec)
Reserved word
SHOW
, TRAFFIC
, RULE
, RULES
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .