Find Query Problems Proactively With Query Reviews

Performance Tuning and Benchmarking
Location: Ballroom A Level: Novice
Average rating: ***..
(3.50, 4 ratings)

Wikipedia defines a code review as a “systematic examination (often as peer review) of computer source code intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers’ skills.”

Wouldn’t it be great to do the same thing, but for the queries run against your databases? This presentation shows you how to do exactly that!

mk-query-digest is a Maatkit tool that can digest queries (similar to the output of mysqldumpslow) in a report. This can be a one-off report, or it can be stored in MySQL for a meta-database of queries. You can use this process to systematically go through every type of query that is sent by the code and set about approving or annotating each query type. For example, I have used this system to EXPLAIN each type of query, so that queries can be optimized before they show up in the slow query log.

This presentation will show how to review the queries in your system on a one-time or ongoing basis. Being able to review new queries before code is released allows you to catch problematic queries before it goes to production. By saving the results in MySQL, you can take the large project of “make sure every query is optimized” and break it into manageable chunks.

Photo of Sheeri K. Cabral

Sheeri K. Cabral

Mozilla Foundation

Sheeri K. Cabral has a master’s degree in computer science specializing in databases from Brandeis University. She has background as a systems administrator; has worked with Oracle, Sybase, DB2, Solaris, RedHat/Fedora, AIX, and HP-UX. Unstoppable as a volunteer and activist since age 14, Cabral founded and organizes the Boston, Massachusetts, USA, MySQL User group, and produces OurSQL: The MySQL Database Podcast for the Community, by the Community. Keep up with all this at

Comments on this page are now closed.


Picture of Sheeri K. Cabral
Sheeri K. Cabral
04/20/2010 12:30am PDT
Picture of Sheeri K. Cabral
Sheeri K. Cabral
04/19/2010 12:52am PDT

Slides are at

  • Oracle
  • Monty Program
  • Calpont
  • Facebook
  • Gear6
  • Infobright, Inc
  • JasperSoft
  • Joyent
  • Kickfire
  • NorthScale, Inc.
  • Percona
  • Schooner Information Technology
  • Solid Quality Mentors (SolidQ)
  • Intel
  • Pentaho
  • Linux Pro Magazine

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at the conference, contact Yvonne Romaine at

Download the O'Reilly MySQL Conference & Expo Sponsor/ Exhibitor Prospectus

Media Partner Opportunities

Download the Media & Promotional Partner Brochure (PDF) for information on trade opportunities with O'Reilly conferences or contact mediapartners@

Press and Media

For media-related inquiries, contact Maureen Jennings at

O'Reilly MySQL Conference Newsletter

To stay abreast of conference news and to receive email notification when registration opens, please sign up for the O'Reilly MySQL Conference newsletter (login required).

Contact Us

View a complete list of O'Reilly MySQL Conference contacts.