MySQL Query Tuning - Indexes versus Histograms By David Stokes

Database query tuning is seen by many as a mystery.  They may add an index or many and then are surprised to find things run S-L-O-W-er. 

The MySQL query optimizer is like a GPS application on your cell phone in that it tries to find the fastest route to your data.  But like a GPS it may not know about traffic jams, your favorite restaurant is closed, or similar commute issues.  So once you have written a good, safe query (basic SQL anti-injection practices will be explained), you will will see how the optimizer seeks to do good things. 

Indexes can speed up queries but the overhead may be too much. Histograms do not have that overhead but they are not a ‘one size fits all’ improvement. This session will cover the information you need to start improving your queries.

David Stokes

David Stokes

  • MySQL Community Manager
  • Company:Oracle
  • Industry Experience :20 + Years
  • Email : [email protected]

Dave Stokes is a MySQL Community Manager for Oracle Corporation and travels extensively to promote MySQL, speaking over thirty times each year for the past several years. He is also the author of MySQL & JSON - A Practical Programming Guide which is a guide for those wishing to take advantage of the JSON data type and the MySQL Document Store. With degrees in computer science and business, you can find him on the road at shows like FOSDEM, SCaLE, Confoo, PHP UK, Scotland PHP, PyCaribbean, or maybe you local meetup (please let him know if you need a speaker!). Dave actually started programming in FORTRAN on punch cards on a Digital Equipment Corporation KL1091 36-bit computer and wants you to know that the dinosaurs roaming the earth at the time did make on-campus parking especially daunting. Has has been playing guitar (badly) for way too long. Dave resides in Texas with the mandatory hound dog and pickup truck.