4 ms·
I used to write a lot of PL/SQL and your assertion is simplistic at best, and misleading at worst. First off it depends on what processing you are doing on wha
by bborud 4y ago
I used to write a lot of PL/SQL and your assertion is simplistic at best, and misleading at worst.
First off it depends on what processing you are doing on what kinds of data sizes. If you are doing relatively simple things, sure. But remember that PL/SQL isn't particularly fast if you need to do anything more complicated. Don't do anything complicated (we'll get to that in point three).
Second, someone has to write that code. Writing PL/SQL is laborious because the tooling is bad. Pick any half-decent language today and the tooling is going to be fantastic. You have language servers, you have optimizing compilers, you have profilers, you have debuggers, you have lots of ways to instrument, inspect, and verify code. Where do you plan to recruit PL/SQL developers and how much are you going to pay them? Because in my experience: there really aren't that many usefully competent PL/SQL developers available on the market. There are lots of people willing to "give it a go", but competence is rare.
Third, it complicates your database. Instead of just doing relational math and executing queries it now also runs code that might not be as easy to model on the same cores, eating into your database IO and memory budget and causing lots of variability. Sure you can hound your PL/SQL developers to adopt various tricks in order to lower the variability of database performance, but that gets expensive. And the code gets ugly.
Fourth: It makes no sense to apply extra load to your most expensive component, which also happens to be the component class that most often also ends up being the bottleneck of your entire system. (Cloud provider pricing is a somewhat useful proxy for the cost of different systems. Have a look at the cost of RDS capacity compared to EC2)
Fifth: did you measure or did you assume? In the cases where you measured a clear gain, was it still worth the cost of all of the above? Did you measure the right thing? Could you argued your case with numbers?