Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: java stored procedures fast, but slow when called as SQL function

Re: java stored procedures fast, but slow when called as SQL function

From: <ctcgag_at_hotmail.com>
Date: 10 Apr 2003 15:47:47 GMT
Message-ID: <20030410114747.506$Cn@newsreader.com>


wizofoz2k_at_yahoo.com.au (Nuno Souto) wrote:
> pete_at_mynix.org wrote in message
> news:<1049837717.61400.0_at_ersa.uk.clara.net>...
> >
> > When the SQL engine has to shell out to call a function, a switch into
> > the JVM takes a relatively long time (about 6 times as long as a
> > switch into PL/SQL).
>
> In common with ANY other environment that has to repeatedly
> shell out to a JVM. The problem is the nature of the JVM,
> not Java or SQL or PL/SQL. It's a monumental context switch
> that invalidates just about EVERY execution pipeline and
> EVERY internal processor cache. That is as lethal to performance
> as it can get nowadays.

There's no reason (other than sanity, perhaps) that the code that implements the JVM can't be intimately mingled with the code that implements the Oracle server stuff. My understanding is that Oracle itself exists in several "layers", wouldn't those also require the same amount of context switching as java does?

...
> Having said that, and before I get the usual barrage of URLs
> that "prove" Oracle still supports Java inside the db,
> let me stress it once again: Oracle ACTIVELY discourages anyone
> from using the in-built JVM in the database. Trust me, OK?
> ;)

Well, maybe parts of Oracle actively discourage it's use, but other parts of Oracle perhaps haven't gotten the message yet.

> >
> > They have been working on this for years, and even are actively
> > promoting the use of Java. I see no fundamental reasons or issues with
> > Java as a language that would prevent the same level of integration
> > with SQL.
>
> They actively promote the use of Java outside of the database
> engine. I think you should start looking at it from that angle
> rather than beating your head against the wall...

Hmmm...Do you think they are going to start de-implementing built-in java functionality? I'd rather remove my eye with a rusty spoon than write graph-isomorph computation algorithms in PL/SQL, and having triggers call out to external java servers doesn't seem all that appealing, either.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB
Received on Thu Apr 10 2003 - 10:47:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US