SHOW TRAFFIC RULE
语法用于查询指定的双路由规则。
ShowTrafficRule ::=
'SHOW' 'TRAFFIC' ('RULES' | 'RULE' ruleName)?
ruleName ::=
identifier
ruleName
时,默认查询所有双路由规则列 | 说明 |
---|---|
name | 双路由规则名称 |
labels | 计算节点标签 |
algorithm_type | 双路由算法类型 |
algorithm_props | 双路由算法参数 |
load_balancer_type | 负载均衡器类型 |
load_balancer_props | 负载均衡器参数 |
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)
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)
SHOW
、TRAFFIC
、RULE
、RULES