# How to split query by user on proxysql

**URL:** <https://forums.percona.com/t/how-to-split-query-by-user-on-proxysql/5675>\
**Category:** Other Tools\
**Created:** [June 13, 2017, 2:15am UTC](https://forums.percona.com/t/how-to-split-query-by-user-on-proxysql/5675 "2017-06-13T02:15:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Young\_Heon.Kim](https://avatars.discourse-cdn.com/v4/letter/y/3bc359/32.png) [@Young\_Heon.Kim](https://forums.percona.com/u/Young_Heon.Kim)\
**Post date:** [June 13, 2017, 2:15am UTC](https://forums.percona.com/t/how-to-split-query-by-user-on-proxysql/5675/1 "2017-06-13T02:15:22Z")

</div>

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,destination\_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 |  
| [COLOR=#FF0000]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?
