If you are a MySQL DBA for a long time (like me), it’s very complicated to get rid of bad habits. One of them I really need to change is the way to retrieve the list of all the running queries (processlist).
Usually, I use SHOW FULL PROCESSLIST
which is very
convenient, but like querying the
Information_Schema
, this statement has negative
performance consequences because it requires a mutex. Therefore,
you should use Performance_Schema
which doesn’t
require a mutex and has minimal impact on server
performance.
Let’s see the output of both commands:
mysql> show full processlist\G *************************** 1. row *************************** Id: 4 User: event_scheduler Host: localhost db: NULL Command: Daemon Time: 376338 State: …[Read more]