2008/6/11 <derby@segel.com>:

Hi,

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!

Yes, i thought that Derby can win this comparsion if it will work with the same speed. I have really easy procedure, so all perfomance cost should be in I/O (also i have more RAM than database take on HDD)

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.

it's more easy to write code on PL/ SQL than use Java. Of course you can try to use SQLJ but...

Let's compare:
PL/SQL code:
            UPDATE testtotals SET
client_total = iTotalAmt
WHERE client = iLastClient;
the same code in Java:
PreparedStatement update = connection.prepareStatement("UPDATE testtotals SET " +
" client_total = client_total + ? " +
" WHERE client = ?");
update.setInt(1, totalAmount);
update.setInt(2, lastClient);
int sqlRowCount = update.executeUpdate();
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.

Oracle can take advantage of partitioning database tables, certain caching, and of course query optimization will vary.


I camparing only speed of data analysis, and only Oracle PL/SQL and Java. I prefer Java, but it have many disadvantages when you need to work with big amount of data.