Be the first to like this
My 2015 presentation on optimizing stored routines, updated and extended from the original 2010 version for Percona Live Amsterdam 2015 https://www.percona.com/live/europe-amsterdam-2015/sessions/optimizing-mysql-stored-routines:
MySQL Stored routines were introduced in MySQL 5.0 - a decade ago. Although not widely adopted, there are certainly cases where they are appropriate and useful. So, they really should be part of every MySQL DBA or back-end developer's repetoire. When writing MySQL stored routines, one should be particularly mindful about performance - even more so than when writing plain SQL queries. MySQL's stored routine engine is much less sophisticated than the SQL query planner and hasn't evolved much since it's inception, and sometimes, a seemingly small difference in how you write your code can really make a huge difference in run-time performance.
During this presentation, I will share a number of my findings and show you benchmarks to help you understand opportunities to optimize your stored routines.