Open renecannao opened 7 years ago
Hi René! Do you have any kind of ETA on this feature? We are seeing slow query spikes and trying to figure out if it is something to do with how Go is calling proxysql vs the DB having issues vs something internal to ProxySQL. (Normally I'd email you, but I happened to find this issue as I was looking for how to see what the slow queries were :))
Hi Seth! :) No ETA yet.
We are seeing slow query spikes and trying to figure out if it is something to do with how Go is calling proxysql vs the DB having issues vs something internal to ProxySQL
The way I would start investigating this is checking if number of slow queries in DB vs number of slow queries in ProxySQL match (assuming that long query time is identical).
In proxysql, the variable that defines long query time is mysql-long_query_time
(time unit is millisecond) and the status variable that counts the slow queries is Slow_queries
.
If they are close, then is the DB having issue. Note that in proxysql the length of the query is as perceived by the proxy, not as executed in mysqld: that is, also the time spent in network IO is accounted.
If they are very different, then it surely needs further investigation.
Thanks, I'll take a look at that!
Hi @renecannao , is there any update on this? thank you
This feature will be very useful to record all slow queries, for example we can set a variable value to long_query_time
, and proxysql save all queries which duration greater than this value to stats tables.
An interesting feature request is to log slow queries in its own slow query log, in the same format as mysql slow query log.