SHOW TRAFFIC RULE

描述

SHOW TRAFFIC RULE 语法用于查询指定的双路由规则

语法

语法 铁路图

  1. ShowTrafficRule ::=
  2. 'SHOW' 'TRAFFIC' ('RULES' | 'RULE' ruleName)?
  3. ruleName ::=
  4. identifier

补充说明

  • 未指定 ruleName 时,默认查询所有双路由规则

返回值说明

说明
name双路由规则名称
labels计算节点标签
algorithm_type双路由算法类型
algorithm_props双路由算法参数
load_balancer_type负载均衡器类型
load_balancer_props负载均衡器参数

示例

  • 查询指定双路由规则
  1. SHOW TRAFFIC RULE sql_match_traffic;
  1. mysql> SHOW TRAFFIC RULE sql_match_traffic;
  2. +-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
  3. | name | labels | algorithm_type | algorithm_props | load_balancer_type | load_balancer_props |
  4. +-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
  5. | sql_match_traffic | OLTP | SQL_MATCH | sql=SELECT * FROM t_order WHERE order_id = 1; UPDATE t_order SET order_id = 5; | RANDOM | |
  6. +-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
  7. 1 row in set (0.00 sec)
  • 查询所有双路由规则
  1. SHOW TRAFFIC RULES;
  1. mysql> SHOW TRAFFIC RULES;
  2. +-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
  3. | name | labels | algorithm_type | algorithm_props | load_balancer_type | load_balancer_props |
  4. +-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
  5. | sql_match_traffic | OLTP | SQL_MATCH | sql=SELECT * FROM t_order WHERE order_id = 1; UPDATE t_order SET order_id = 5; | RANDOM | |
  6. +-------------------+--------+----------------+--------------------------------------------------------------------------------+--------------------+---------------------+
  7. 1 row in set (0.04 sec)

保留字

SHOWTRAFFICRULERULES

相关链接