Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the influence of compiling ORACLE packages with DEBUG

we compile all our Oracle Packages with the DEBUG option enabled. This is the default for our IDE (PLSQLDeveloper). So when we compile a package in the background the following is executed:

ALTER PACKAGE emp_mgmt
   COMPILE DEBUG PACKAGE;

I wonder if there are any performance consequences for this. The Oracle docs about ALTER PACKAGE do not mention anything about this.

like image 447
Robe Elckers Avatar asked Jan 19 '11 08:01

Robe Elckers


People also ask

What is the use of debug privileges in Oracle?

Debug all PL/SQL and Java code in any database object. Display information on all SQL statements executed by the application. Note: Granting this privilege is equivalent to granting the DEBUG object privilege on all applicable objects in the database.

What is the purpose of package in Oracle?

Packages prevent cascading dependencies and unnecessary recompiling. For example, if you change the body of a package function, Oracle Database does not recompile other subprograms that invoke the function, because these subprograms depend only on the parameters and return value that are declared in the specification.

What is compile for debug in SQL Developer?

Compile a PL/SQL object with the debug option The compilation helps the Oracle interpreter to process your code faster. Right-click the PL/SQL object that you want to debug and select Database Tools | Recompile. In the Recompile dialog, select With "debug" option. Click OK.

What is compiling in Oracle?

During the execution process, this byte code is interpreted, a process which requires time and resources. The process of native compilation converts PL/SQL stored procedures to Pro*C, which is then compiled to native code shared libraries, resulting in performance increases for the procedural code.


1 Answers

There's a whole range of optimizations that the PL/SQL compiler can do.

Setting the mode to debug is equivalent to setting the optimizer level to 1 (disabling most of the optimizations)

So it could have a significant impact on performance.

like image 168
Gary Myers Avatar answered Sep 17 '22 15:09

Gary Myers