Re: Java v. PL/SQL Stored Procedures

From: Chad Nale <cnale_at_microtaskinc.com>
Date: Thu, 5 Aug 1999 20:59:47 -0000
Message-ID: <NAqq3.5840$W11.123644_at_wbnws01.ne.mediaone.net>


[Quoted] We have found exactly the opposite. What version of 8i are you running, i.e, enterprise or standard? We have
[Quoted] 8.1.5.0 Entreprise Edition running currently on a Windows 2000 advance server, PII 300 with 192MB of ram. We found that while searching 35000 rows [Quoted] of data and preforming calculations on them, that the java stored procedures [Quoted] where at least twice as fast if not more. But this was timed and accomplished through ASP pages using the oracle objects for OLE to access the database.

[Quoted] What java complier are you using? We use JDeveloper 2.0.

[Quoted] Let me know if this helped

Chad Nale
cnale_at_microtaskinc.com

Craig Willis <cwillis_at_netignite.com> wrote in message news:37A865D5.5C956F28_at_netignite.com...
> We are in the process of evaluating Oracle 8i Java stored procedures.
>
> We performed some preliminary tests (simple class based on the emp.class
> that queries a table of 50,000+ rows). Basic timings indicate that the
> PL/SQL stored procedure is still almost twice as fast as the Java stored
> procedure.
>
> I would like to transition to the Java stored procedures (it definitely
> beats PL/SQL in terms of open-standards), but we cannot justify it if
> the performance is half of that of PL/SQL.
>
> Can anyone provide any insight? Documentation on Oracle benchmarks?
>
> Thanks,
> Craig
>
> -------------emp.sql------------------
> create or replace function sal_grade (current_sal in number) RETURN
> VARCHAR2
> IS
> BEGIN
> IF CURRENT_SAL > 0 AND CURRENT_SAL < 50000 THEN RETURN 'MTS'; END IF;
> IF CURRENT_SAL >= 50000 AND CURRENT_SAL < 100000 THEN RETURN 'SMTS';
> END IF;
> RETURN 'Salary out of range';
> END sal_grade;
> /
>
> ------------ emp.java ----------------
> package com.oracle.employee;
>
> public class emp {
> public static String sal_grade (float current_sal) {
> if (current_sal > 0 && current_sal < 50000) return "MTS";
> if (current_sal >= 50000 && current_sal < 100000) return "SMTS";
> return "Salary out of range.";
> }
> public static void approve_raise (float current_sal, float raise,
> float new_sal [ ]) {
> float percent_raise = (raise / current_sal) * 100;
> if (percent_raise > 15 || percent_raise < 5)
> new_sal[0] = -1;
> else {
> new_sal[0] = current_sal + raise;
> }
> }
> }
> ~
>
Received on Thu Aug 05 1999 - 22:59:47 CEST

Original text of this message