Native and interpreted compilation techniques
Until Oracle 9i, all PL/SQL program units were compiled in interpreted mode. Starting with Oracle 9i, PL/SQL programs can be compiled either in interpreted mode or native mode. Let's quickly understand what are interpreted and native compilation modes.
The PL/SQL compiler generates machine code for the program units. Machine code is a set of instructions stored in the database dictionaries that runs against the PL/SQL virtual machine (PVM). At the time of the program invocation, the M-code is scanned by one of the subroutines in the PVM. The scanning process involves the identification of the operation code and operands and routing the call to the appropriate subroutine. The scanning of the machine code instructions consumes systems resources, which may impact the runtime performance of the code. This is how interpreted compilation works. In the case of native compilation, a shareable dynamic linked library (DLL) is generated instead of a machine...