|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Of all of the exciting new features of Oracle9i, compiled PL/SQL is one of the most exciting developments. Starting in Oracle9i, PL/SQL code can be compiled, and preliminary reports show that code can run as much as 8 times faster than interpreted PL/SQL One of the features of the Oracle PL/SQL was that it was an interpreted language. In an interpretive language each line of code is individually parsed and executed before moving onto the next line of code. While interpretation results in tremendous runtime flexibility to PL/SQL, the downside was that the information could not be packed into a tight executable module that could be run directly from the operating system. This has tremendous advantages:
The best part of all is how remarkably easy it is to compile Oracle PL/SQL. We start by setting a few initialization parameters. The compiled code corresponding to a PL/SQL program is mapped to a PGA as opposed to SGA to allow better concurrent access. With native compilation, PL/SQL that does not contain SQL references can be 2-10 times faster To turn native compilation on, you need to issue the following statement: ALTER SESSION SET plsql_compiler_flags=NATIVE; In Oracle9i, a PL/SQL library unit can be compiled as native C code, rather than interpreted as byte code. It is then stored as a shared library in the file system. The process of compiling a PL/SQL function or procedure is very simple: ALTER FUNCTION my_func COMPILE; Compilation results in faster execution of PL/SQL programs because of the elimination of the overhead associated with interpreting byte code and better control flow in native code than in interpreted code If you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The Definitive Reference” by Rampant TechPress. It’s only $41.95 (I don’t think it is right to charge a fortune for books!) and you can buy it right now at this link: http://www.rampant-books.com/book_2003_1_oracle9i_sga.htm
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 1996 - 2009 by
Burleson Enterprises, Inc. All rights reserved.
Oracle® is the registered trademark
of Oracle Corporation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||