Optimizing MySQL Stored Routines

Roland Bouman (XCDSQL Solutions / Strukton Rail)
Average rating: ***..
(3.75, 8 ratings)

MySQL stored routines (functions, procedures, triggers and events) can be useful. But many casually written stored routines are unnecessarily slow. The main reason is that MySQL does not apply even simple code optimizations to stored routine code. Many developers are not aware of this, and as a result, write stored routine code that can quite easily be tuned, increasing performance by 50%-100% by only applying very straightforward code optimizations.

During this session, I will present a few real-world stored routines. Most of them were at some point sent to me by users running these procedures in production environments. I will demonstrate a few step-wise improvements, and show graphs to illustrate the effect on performance. The goal of the session is to make developers aware of potential issues in their own stored procedures, and have them takeaway a few practical solutions to avoid these issues in the first place.

Specific topics include:

  • impact of simple assignments
  • handling and raising errors
  • cursors and how to avoid them
  • the impact of dynamic sql
  • recursion and iteration
  • choosing the right control structures
Photo of Roland Bouman

Roland Bouman

XCDSQL Solutions / Strukton Rail

I studied Molecular Biology, but I’m professionally occupied as Web Application Developer, Information and Business Process Analyst, and Business Intelligence Guy. I have worked for Inter Access, MySQL AB, Sun Microsystems, and I currently work for Strukton Rail.

  • 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 yromaine@oreilly.com

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@ oreilly.com

Press and Media

For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com

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.