Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: java stored procedures fast, but slow when called as SQL function
"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> writes:
> <pete_at_mynix.org> wrote in message
> news:1049837717.61400.0_at_ersa.uk.clara.net...
> > Richard Kuhler <noone_at_nowhere.com> writes:
> <snip>
> > Yes: Java as a language is clearly faster than PL/SQL (you can measure
> > yourself)
>
> This statement and of course the reverse, which is what I would suspect, are
> crying out for justification. So given that we are all agreed that PL/SQL
> stored procs outperform Java Stored Procs, where is you measurement showing
> that java is faster except when calling from SQL? Or alternatively how do
> you know that it is the context switch that is slow?
If I call one Java SP that does a lot of (non SQL) work and write the equivalent in PL/SQL, the Java version is up to 10 times faster. For example a prime number calculation.
If I have a trivial Java SP and call it as an SQL function, and do the same in PL/SQL, the PL/SQL function is 6 times faster. Received on Wed Apr 09 2003 - 08:55:29 CDT
![]() |
![]() |