Reputation: 977
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.
Upvotes: 14
Views: 11374
Reputation: 35401
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.
Upvotes: 9
Reputation: 71
Compiling with the debug option definitely affects performance. A simple test that loops 50,000 times calculating a metaphone for example (lots of string tests, if then else ...) takes twice the time in debug mode.
Upvotes: 2
Reputation: 2831
Oracle provides a Debug API for IDE developers. In the case that a Package is compiled with the DEBUG
option, it is possible to set breaktpoints with that API. If you compiled all packages with the DEBUG
option, someone can set a breakpoint via that API to manipulate the system!
So I think it is more an security issue than a preformance problem to compile Packages in debug mode.
EDIT:
SET_BREAKPOINT
Function in the Oracle documentation
Upvotes: 4