There are a great many uses for stored procedures. They can eliminate round trips, and they can encapsulate logic in the database. It is a pity that MySQL stored procedures are so limited that hey do not even encapsulate the full standard, and require difficult constructs by not implementing "for" loops, and other language conveniences. But they are very powerful. I am probably the only person outside of Oracle to publish open source tools that rely on them heavily, because the logic they employ belongs in the database (Flexviews and PS_history being the primary two). As an example from Oracle, the sys schema uses stored functions to great effect. Just because something is clunky, it does not make it worthless, it simply means that more effort has to be put in to get the desired result, but the effort can very well be worth it. On Tue, Nov 8, 2016 at 4:29 AM, Игорь Пашев <pashev.igor@gmail.com> wrote:
2016-11-07 18:43 GMT+03:00 Sergei Golubchik <serg@mariadb.org>:
Hi, Federico!
On Nov 07, Federico Razzoli wrote:
Some good points from Bill Karwin: https://www.quora.com/What-are-the-reasons-not-to-use-or- not-use-stored-procedures/answer/Bill-Karwin
Thanks.
These are valid points, and some of them are related. For example, "does not have a rich library of functions or standard procedures" that follows from "does not support packages". Which might be fixed in https://jira.mariadb.org/browse/MDEV-10591
External languages for stored procedures - that's a very cool feature, and patches exist for many years. But, apparently, it's more cool than practically useful? There were almost no requests for it, not when I was in MySQL, not in MariaDB. And, frankly, I do not know why, this looks insanely useful to me.
I value stored procedures only for maintenance tasks and only in the `mysql` DB. Anything else is PITA :)
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp