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: Peter J. Holzer <hjp-usenet_at_hjp.at>
Date: Mon, 14 Apr 2003 17:59:16 +0200
Message-ID: <slrnb9lmmk.l0q.hjp-usenet@teal.hjp.at>


On 2003-04-14 10:41, Noons <wizofoz2k_at_yahoo.com.au.nospam> wrote:
> Following up on Peter J. Holzer, 14 Apr 2003:

>> Really? I cannot think of any other DB vendor which offers Java for
>> stored procedures at the moment. 

>
> Me neither. I said "supplier", not "db vendor". By this I mean
> the application server suppliers. As for the db vendors, NONE
> has fallen for the trap of the JVM inside the db engine.

Except for Oracle. At least the Oracle8i Java Stored Procedures Developer's Guide says so:

| The JServer JVM and Its Components
|
| The JServer Java virtual machine (JVM) is a complete, Java 2-compliant
| Java execution environment. It runs in the same process space and
| address space as the RDBMS kernel, sharing its memory heaps and
| directly accessing its relational data. This design optimizes memory
| use and increases throughput. 

> Why do you reckon this is so? It really doesn't make much sense if
> you think about it for a while.

Depends on what you are trying to do. If you want to write row triggers and simple functions in Java (which are called very frequently) it makes a lot of sense to minimize call overhead. If you are writing an application, which happens to need a database, that is probably better separate from the database.

>> What has that to do with whether the JVM runs in the same process as the
>> PL/SQL interpreter or in a different? 

>
> Everything. That level of integration between the two requires
> a LOT of specific coding EVERY SINGLE TIME Sun delivers
> a new version of Java.

AFAIK Oracle does come with its own JVM. So they already have exactly this problem, IF they want to stay current.

        hp

-- 
   _  | Peter J. Holzer    | Latein ist das humanoide Äquivalent
|_|_) | Sysadmin WSR       | zu Fortran.
| |   | hjp_at_hjp.at         |
__/   | http://www.hjp.at/ |    -- Alexander Bartolich in at.linux
Received on Mon Apr 14 2003 - 10:59:16 CDT

Original text of this message

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