db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quartz <quartz...@yahoo.com>
Subject profiling the derby code: statement compiler is sub-par
Date Wed, 07 Mar 2007 17:18:26 GMT
Hi,

I was wondering why derby is ~200 times slower than mysql on a simple INSERT statement.
I'm not expecting a pure java db to be as fast, but not that slower.

I insert 200 'int' fields in a nearly empty table, with only 1 field as primary key.
I insert rows in ascending PK order and set all fields values.

CREATE TABLE data (
  t int NOT NULL default 0,
  field_1 int NOT NULL default 0,
  field_2 int NOT NULL default 0,
...
 PRIMARY KEY (t)
)


Profiling the jvm in sampling mode showed that 89% of the CPU in my test goes into compiling
the
statement.

There are lots of Class.getDeclaredMethod(...) callse underneath,
and uses StringBuffer instead of StringBuilder (jdk 1.5 howver).

Hopefully there are a couple 80%-20% hot spots that could be fixed easily.

Hope you can give derby a boost...



 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

Mime
View raw message