Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Java stored procedures. Are they slower than PL/SQL?
"Don Chambers" <dchamber_at_mindspring.com> wrote in message
news:4bfnrt4k1kgkv1rhp452v62n4ermejtjur_at_4ax.com...
> I have created my first java stored procedure and it seems very slow.
> I use it to move a large amount from a load table to main tables. In
> a previous design we used PL/SQL procs and this load took about 8
> hours. Based on the number of rows that loaded before I left tonight
> it looks like the JAVA proc will take over 20 hours. Why the HUGE
> difference?
>
> Is there a way to speed this up?
> Are the java procs compiled or do they use the just in time compiler?
>
> Thanks,
> Don
Java procs are, AFAIK, *not* compiled, and if they are compiled, they are
compiled to so-called p-code (pseudo-code), which is machine independent,
and still would need the JVM to run.
So, yes, by design Java stored procedures are slower than their
corresponding pl/sql equivalents, due to the nature of Java.
The only way to speed that up is not to use them everywhere, and not to fall
victim to the Java hype.
Regards,
Sybrand Bakker, Senior Oracle DBA Received on Wed Oct 03 2001 - 22:37:30 CDT
![]() |
![]() |