Hereby I release the first version of SQLStats, which is a much enhanced version of what I described in the previous post. This is a MySQL Plugin for MySQL 5.5 that allows you to monitor the most recently executed, and the most frequently executed statements using 2 INFORMATION_SCHEMA tables. The thing is not very complex, to be honest, but it does do the job. So what was the job then? Well, looking at what this plugin does, it goes something like this:
- Allows you to monitor ALL SQL statements executed by the server.
- The SQL statements are "normalized", meaning that literals / constants are removed before comparison.
- Data is saved in memory. No disk access and very little overhead.
- Data is retrieved from INFORMATION_SCHEMA tables, just a simple SELECT and you know what is going on in the server.
There is no need for MySQL Proxy or anything like that. There is no need to change something in the Client or in the Connector. To be honest, there are a couple of things I want to add to the plugin eventually, but this is a starting point at least. To use it: download it, install the tomcat / mysql monitoring server, install the monitoring agent and ... No wait, that was MySQL Enterprise Monitor, this is how you do it: download, build, install and use it. That's it.
So where can I get it, you ask (or maybe you don't, but I'm gonna tell you anyway). It's on sourceforge, and you can download it from here:
There are two files to download: A simple PDF documents with some basic usage and configuration tips, and a source-code package (which also includes the same PDF).
What would I want from you? Ideas for future development, bug reports and a few beers, that's it, not too much to ask, eh?
Also, did I mention that the overhead is VERY low...