vodarus vodarus wrote:
it takes up to 12 seconds to calculate TESTTOTALS. Oracle PL/SQL procedure with the same algorithm need 1,5 second.

*How can i improve performance? Or Derby is so slow because of Java / JVM issues???*

Thanks.

I do not have any experience with performance of stored procedures, but note that Derby has a pretty high overhead for query compilation since it compiles queries directly into Java byte code. Hence, comparison on single executions of statements will usual not be in favor of Derby. However, if same statements are executed many times efficiency improves (both due to reuse of compiled plans and hot-spot compilation of the Java code).

For you particular problem, why use stored procedures when you can do the same with the following query:

insert into testtotals
select client, sum(order_amount) from testbig group by client;

--
Øystein

Reply via email to