Re: Java stored procedures. Are they slower than PL/SQL?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 4 Oct 2001 05:37:30 +0200
Message-ID: <trnn3ekoo8sh7c_at_news.demon.nl>


[Quoted] [Quoted] "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 [Quoted] victim to the Java hype.

Regards,

Sybrand Bakker, Senior Oracle DBA Received on Thu Oct 04 2001 - 05:37:30 CEST

Original text of this message