Although MySQL stored routines have their drawbacks, especially performance-wise, they still have their use. However, there are many things that can go wrong, and in many cases, observing a few principles, and adopting a few coding habits can have huge benefits for performance and maintainability of your stored routines.