mysql performance test We are planing to test the performance of the new DB server. For that we have the below the plan:


get production sql queries
replay those sql queries against the different DB


I was planing to use pt-log-player to play the sql queries and use the pt-query-digest to analyze the result files which gets generated from pt-log-player after execution. So my questions are:


how to get the production query in the first place. enabling slow log query is not an option due to performance reason (as our DB admin denied about that)
Why pt-log-player is deprecated, was there any bug or whats the reason behind.
Or someone can suggest me a complete different toolset to do the perf test. Thanks.
1) Although I prefer tcpdump myself I would ask what is the reason not to enable slow logs because it is not that big of an overhead. With reasonable thresholds it's actually very useful.

If you want to be super cautious you can safely enable it with a conservative long_query_time and slowly dropping it. The variable is dynamic so you can change it on the fly if you experience issues. Also depending on the flavor of your server (Percona for example) you may be able to set log_slow_rate_limit which was designed for exactly this purpose.

Another way to do it would be to use tcpdump which you can do on the server, on a shadow server (if your networking setup supports it) or on the application server as well. Then you can use pt-query-digest to extract the queries from it:

tcpdump -s 65535 -x -nn -q -tttt -i any -c 1000 port 3306 &gt; mysql.tcp.txt
pt-query-digest --type tcpdump mysql.tcp.txt


This is a very versatile solution so it's worth to get familiar with. 

More info can be found on https://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html

2) This is just an assumption but there are many-many ways to execute/replay queries so I think that's the reason for the dropped support. 

3) If you have your queries you can also use percona playback, mysqlslap, sysbench or any other tools to execute them as you wish. If you want to write your own stress tool I have a web request playback code example which can give you some ideas.