Reputation: 35734
From the command line (linux) how can i zero in on long running mysql queries?
For exammple, I can use "top" on a linux box and see that mysqld is hogging lots of memory. Are there any mysql command line commands i can use to go into further details and narrow down the culprit queries?
Upvotes: 1
Views: 3108
Reputation: 2066
mytop shows the currently running queries. You can also tell mysql to create a slowlog, a log of all queries taking more than a certain time to complete.
Upvotes: 1