Archive for the ‘Updated Article’ Category
mysqlsla v2 is finally “done” and released. About 3 months ago, when v1.8 was released, I said it would be coming “soon,” but time just flew by and here we are. Oh well. In any case, the v1 branch is dead to me and v2 is all the rave (at least for me). If you don’t care about the differences and all you want is your default top 10 report from a slow log, for example, then all you need to know is:
mysqlsla -lt slow SLOW_LOG
For those interested in what has changed to warrant a new major version number, here’s the briefing of changes/overhauls:
- Almost ALL new command line options (–log-type a.k.a. -lt is the most important); see the documentation
- Customizable reports. In v1 the report was hard-coded. Now with -rf FILE you can format your own report. See the doc on reports.
- FULL filtering and sorting. Somewhere around v1.7 (if I remember correctly) filtering based on things like the connection ID, etc. was introduced. v2 is more abstracted and allows more complex filtering on any “meta-property” available in the log (and sorting by most of them, too). See the doc on filters.
- Replays to compact fat text log files into super-compact binary files.
- Slightly better query abstraction.
- Full support for microslow patched slow logs.
- User-defined logs so that, one day, we may begin parsing, filtering, analyzing and sorting custom logs from things like MySQL Proxy.
- And in general, what I called the “mysqlsla v2 Library: 6 long, detailed pages documenting just about single, tiny aspect of mysqlsla (plus with the “installer” you get a mysqlsla man page, too).
As this is pretty much an entire code overhaul, please please report bugs, problems, suggestions and whatever. Please also send me your log files: slows, generals, binaries. They help me tremendously because I cannot sit around inventing up all the weird kinds of stuff I’ve seen in other people’s logs.
And as always, thank you all for your support, and thanks to those people who provided feedback, patches and such.
The Guide To Understanding mysqlreport has been updated. As many people have noticed, since mysqlreport v3.2, Key Write and Read ratio went away, replaced by Write and Read hit percentage. I figured that “99.87%” was more intuitive than “0.0013″.
It’s strange what articles on one’s site become “popular.” I wrote Non-technical Guide to Isolating Slow MySQL Queries some time ago when I was an internal system admin at a data center. I wasn’t “customer-facing” but I still got requests from customers who wanted me to look at their MySQL server. Since that wasn’t my primary responsibility, I had to enlist their help to save me time. Hence, I wrote this article to help not-technically-inclined customers through the first few steps.
My webstats have shown this page to be hit more often than I would have expected. Consequently, I felt that I should update it, so I did.