| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Java v. PL/SQL Stored Procedures
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------------------
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.";
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;
}
![]() |
![]() |