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

From: Howard J. Rogers <howardjr_at_www.com>
Date: Thu, 4 Oct 2001 15:31:46 +1000
Message-ID: <3bbbf3d7$1_at_news.iprimus.com.au>


Far be it from me, a Java basher of many years' good standing, to leap to Java's defence, but it is simply not true that Java Stored Procedures are "designed" to be slower than PL/SQL, nor that they actually are. Oracle uses various optimisation techniques to mean that Java should run as fast as, or nearly as fast as, the equivalent PL/SQL procedure.

Being as knowledgeable on Java internals as I am on Vedic references to Lunar phase changes and their relationship to marsupial mating habits, I can't give you the low down on this: but the Oracle Java gurus who wrote the stuff in the first place assure me that the 'jsp's are slower than pl/sql' hoary old myth is just that: a myth.

Regards
HJR

--
Resources for OracleT: www.geocities.com/howardjr2000
=========================================


"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
news:trnn3ekoo8sh7c_at_news.demon.nl...

>
> "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 Thu Oct 04 2001 - 07:31:46 CEST

Original text of this message