Buy Percona ServicesBuy Now!

How to split query by user on proxysql

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to split query by user on proxysql

    Hi.
    I am testing using PXC & Proxysql.
    I would like to split some query of specific user(etl), so I added query rule like this:

    mysql> select rule_id,active,username,match_pattern,apply,destin ation_hostgroup from mysql_query_rules;
    +---------+--------+----------+----------------------+-------+-----------------------+
    | rule_id | active | username | match_pattern | apply | destination_hostgroup |
    +---------+--------+----------+----------------------+-------+-----------------------+
    | 3 | 1 | NULL | ^SELECT.*FOR UPDATE$ | 1 | 0 |
    | 4 | 1 | NULL | ^SELECT | 1 | 1 |
    | 5 | 1 | etl | ^SELECT | 1 | 2 |
    +---------+--------+----------+----------------------+-------+-----------------------+
    3 rows in set (0.00 sec)

    And then I tried to test using sysbench,but it was not working as I thought.
    Does it need any other configuration for this?


Working...
X