Functions Defined Within SQL

Kim Berg Hansen · Apress eBooks · 2020

One of the beauties of the SQL language in Oracle is that it can so easily be extended by writing functions that SQL can call. But the thing to note is that SQL and PL/SQL are executed by two different engines, each with small differences, for example, how variables, datatypes, and memory are handled. Every time SQL calls a PL/SQL function, or vice versa PL/SQL executes static or dynamic SQL, data is passed from one engine to the other with some possible conversion along the way – this is called a context switch. In version 12.1, it became possible to minimize this context switch, so it often becomes barely noticeable.

Read the paper · More papers on PaperTik