Saturday, July 22, 2006

Looking at running queries SHOW FULL PROCESSLIST

One of the most common commands that a MySQL DBA performs is the SHOW FULL PROCESSLIST command. I can't tell you how many thousands of times I've run this. The problem is that there is too much information that I need to filter out before I can focus on the queries that matter. Fore xample, I don't want to see any idle connections nor do I want to see my own connection. The other problem is that if most queries run in under a second, I miss a lot of queries.

Problem solved!

I have posted a very handy script named proclist.pl to MySQL Forge.This script can be used to periodically poll the server for queries, with millisecond precision. Moreover, the output can be imported into a MySQL database for further analysis.

4 comments:

Anonymous said...

With the mysql command line client you can use the pager command to filter the results using shell commands. For example:
pager grep -v Sleep
show processlist;
will filter out sleeping connections.

Anonymous said...

Other good tools for this purpose include mytop and innotop.

Anonymous said...

Have a look at MyMonitor. This is similar to some other monitoring tools, but has a few differences, the main one being that it strips out literals from the monitored SQL statements, before calculatiing statistics. A new version is on it's way, with some more features, including general query log support.

MyMonitor is available at http://sourceforge.net/projects/mymonitor

Anonymous said...

You will get a beautiful cloth which in the game if we want to need the beautiful cloth, we can use our own Scions Of Fate gold to buy. The one I owned on my character is one of my friends sent to me the necessary SOF gold. Sometimes we can share the trophy as the necessary Scions Of Fate money together, and we do quest together. I do not have enough confidence and cheap SOF gold about my weak memory. First I have to buy sof gold to improve my pet which I have a lovely leopard in this game.
When I begin to play this Seal Online game, I first go to buy seal online cegel to buy some my favorite and beautiful clothes to dress up my character. I have spent cheap seal cegel to buy my favorite cloth. I mean we have anime and some necessary seal online cegel based games that do not look really kid dish. Though I will admit with my own seal cegel I went crazy on leveling with DECO. Some of the skills that we can use our sealonline cegel to improve to look amazing, and are fun to just watch honestly.