You really can't compare Derby against Oracle.
They are two different beasts.
You can't embed Oracle in your application. You can embed Derby.
You spend $$$$ on an Oracle solution. You spend $ on Derby. TANSTAAFL!
Oracle has a paid support staff of developers. Derby? Their support staff is paid by IBM and SUN. Ooops! IBM stopped supporting Cloudscape, no? Or else community members support Derby outside of their $Dayjob.
Oracle big, written in C/C++ etc.
Derby? 100% Java, small.
If you want a better comparison, write a Java Stored Procedure in Oracle and then compare the time. Even then you will have differences that will effect your performance.
UPDATE testtotals SETthe same code in Java:
client_total = iTotalAmt
WHERE client = iLastClient;
PreparedStatement update = connection.prepareStatement("UPDATE testtotals SET " +Also there is no support for SQL in java, so SQL live as Strings without any checks. SQLJ can help here, but java refuse usage of preprocessor, so IDE's not understanding SQLJ dialect.
" client_total = client_total + ? " +
" WHERE client = ?");
int sqlRowCount = update.executeUpdate();
Oracle can take advantage of partitioning database tables, certain caching, and of course query optimization will vary.