Calling PL/SQL from SQL

Alex Nuijten, Patrick Barel · Apress eBooks · 2023

Calling a reusable piece of code stored in a PL/SQL function—packaged or stand-alone—results in a context switch. The SQL engine stops whatever it is doing and gives control to the PL/SQL engine, which then does its work and returns control to the SQL engine after it’s done. These context switches are relatively expensive. They involve a lot of work by both engines to transfer all the relative information before the real work can be done. Oracle Database offers a multitude of possible solutions to minimize the overhead.

Read the paper · More papers on PaperTik