This final part of the book hopes to take you from “good” to “great.” Getting programs to work correctly is hard enough: any program that works is probably a good program. A “great” program is one that performs efficiently, is robust and secure, and is easily maintained.
Stored procedures and functions raise a number of unique security concerns and opportunities: these are discussed in Chapter 18. Chapters 19 through 22 cover performance optimization of stored programs. Chapter 19 kicks off with a general discussion of performance tuning tools and techniques. The performance of your stored programs will be largely dependent on the performance of the SQL inside, so Chapters 20 and 21 provide guidelines for tuning SQL. Chapter 22 covers performance tuning of the stored program code itself.
Chapter 23 wraps up the book with a look at best practices in stored program development. These guidelines should help you write stored programs that are fast, secure, maintainable, and bug-free.
Chapter 18, Stored Program Security
Chapter 19, Tuning Stored Programs and Their SQL
Chapter 20, Basic SQL Tuning
Chapter 21, Advanced SQL Tuning
Chapter 22, Optimizing Stored Program Code
Chapter 23, Best Practices in MySQL Stored Program Development