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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With