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: Benchmarks - Java vs PL/SQL

Re: Benchmarks - Java vs PL/SQL

From: Peter J. Holzer <hjp-usenet_at_SiKitu.wsr.ac.at>
Date: Mon, 18 Dec 2000 22:07:59 +0100
Message-ID: <slrn93sv5f.1pj.hjp-usenet@teal.h.hjp.at>

On Mon, 18 Dec 2000 16:29:20 GMT, Ezr Vinh wrote:
>In article <3A3BB8DC.9E14E0E0_at_hotmail.com>,
> rickhall2000_at_hotmail.com wrote:
>> I did some looking into this because I was considering rewriting
>> some PL/SQL sp's in Java. According to Oracle, for sp's that are
>> processing intensive, Java can out perform PL/SQL 5 to 1. For sp's
>> that are data intensive PL/SQL will out perform Java at 10:1.
>
>While I hadn't seen this claim before, I have no difficulting
>believing it; it seems reasonable. However, since we're talking about
>database applications here, I would assert that in virtually any given
>situation, I/O from database operations is the bottleneck, and not CPU
>usage. On every system I've worked on over the past 10 years, we've
>been chasing I/O and memory with bearly a thought towards the CPUs. You
>go with Java, and the expected 5% gain in CPU efficiency is going to be
>completely irrelevant when your box is stuck in iowait. I'll take the
>10% improvement data handling from PL/SQL any day.

If by "data handling" you mean sql queries, it doesn't matter whether you invoke the query from java or from PL/SQL. The largest differences (according to an Oracle trainer I spoke with last week) are between arithmetic on simple types (integer and fp) and string handling. In the first category Java is much faster, in the second, PL/SQL is much faster, unless you take some care to tune your Java code (e.g., use StringBuffer instead of String).

Also note that he didn't write "10%", he wrote "10:1" as in "ten times as fast (or slow)". A factor of ten is quite a lot.

        hp

-- 
   _  | Peter J. Holzer    | Es war nicht Gegenstand der Abstimmung zu
|_|_) | Sysadmin WSR       | Punkt 1b), die Anordnung der natürlichen 
| |   | hjp_at_wsr.ac.at      | Zahlen neu festzulegen.
__/   | http://www.hjp.at/ |	-- Johannes Schwenke <jby@ginko.de>
Received on Mon Dec 18 2000 - 15:07:59 CST

Original text of this message

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