Quanto - MySQLProxy query aggregator

Easy aggregation of your query statistics.

Tomas Doran < t0m@state51.co.uk >

Query comments

Change your code to emit a comment for each query.

/* Filename@LINE_NO@subroutine */
SELECT *
FROM giant_table
JOIN other_giant_table
WHERE unindexed_field = 'hahaha';

You can see the comment when you SHOW PROCESSLIST

Really handy!

Filename & line + svn blame

No use for lots of little queries in a loop though..

We generate by

Example only - apply to your language of choice.

And monkeypatch DBI

Example only (although our technique is similar in ruby)

Quanto

Extension to MySQLProxy written in Lua.

Filters and aggregates your query comments.

Stores timing information, counts number of calls, row counts returned etc.

Adds extra commands to the MySQL vocabulary to get query stats back. CGI + JQuery to display in browser.

Solves the lots of queries in a loop problem.

NOT perl specific.

Screen shot 1

Screen shot 2

Questions?

Code and presentation are on github:

http://andym.github.com/Quanto

Patches welcome, especially solutions for generating query comments in your language of choice, or a less crappy cgi.

Thanks!