Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Wrapped PL/SQL vs. not Wrapped
A copy of this was sent to "Johan Wegener" <xjw_at_xdde.xdk>
(if that email address didn't require changing)
On Fri, 7 Jan 2000 11:36:28 +0100, you wrote:
>Thanks for the reply! But surely some differences must exist, the wrapped
>PL/SQL variety must obviously be parsed by another parser than the readable
>one. Or am I missing something? The Oracle documentation does not describe
>how this situation is handled. Could you?
>
you asked "is the parsed plsql parsed and executed faster then non-wrapped".
it executes at exactly the same speed at run time since we parse the code when you load it into the database. If you load a wrapped procedure and a non-wrapped procedure -- they are both compiled into P-CODE. The P-CODE is what is executed.
wrapped code is purely to obfusicate the code (make it unreadable by prying eyes).
wrapped code is just a tokenized version of the plsql source code. It appears that it might even take longer to process wrapped code, then non-wrapped code when compiling initially:
tkyte_at_8i> @t
Creating NON-Wrapped code
Elapsed: 00:00:00.07 << time to create non-wrapped spec Elapsed: 00:00:00.72 << time to create non-wrapped bodyNo errors.
old 1: select hsecs - &T ELAPSED from v$timer new 1: select hsecs - 7161618 ELAPSED from v$timer
ELAPSED
249 << total time 2.49 seconds to do the above 3 timesElapsed: 00:00:00.00
Creating Wrapped code
Elapsed: 00:00:00.20 << time to create WRAPPED spec Elapsed: 00:00:00.94 << time to create WRAPPED body...No errors.
ELAPSED
395 << total time, 3.95 seconds to do the above 3 times... Elapsed: 00:00:00.01
>Thanks again,
>Johan
>
>Thomas Kyte <tkyte_at_us.oracle.com> skrev i en
>nyhedsmeddelelse:8a497sgej11opdiuvs9amc6olqu5d9m3cg_at_4ax.com...
>> A copy of this was sent to "Johan Wegener" <xjw_at_xdde.xdk>
>> (if that email address didn't require changing)
>> On Thu, 6 Jan 2000 14:01:11 +0100, you wrote:
>>
>> >Hi,
>> >
>> >A simple question:
>> >
>> >Does anybody know whether wrapped PL/SQL is parsed and executed faster
>than
>> >non-wrapped?
>>
>> no, wrapped/non-wrapped execute the same at run time.
>>
>> >In other words, what is the best way of distributing PL/SQL
>> >modules from a performance point of view? Any other considerations in
>this
>> >context?
>>
>> use wrap when you don't want people reading your source code. use
>non-wrapped
>> otherwise.
>>
>> >
>> >Thanks,
>> >Johan
>> >
>>
>>
>> --
>> See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to
>Oracle8i'...
>> Current article is "Part I of V, Autonomous Transactions" updated June
>21'st
>>
>> Thomas Kyte tkyte_at_us.oracle.com
>> Oracle Service Industries Reston, VA USA
>>
>> Opinions are mine and do not necessarily reflect those of Oracle
>Corporation
>
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Jan 07 2000 - 07:44:22 CST
![]() |
![]() |