db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: profiling the derby code: statement compiler is sub-par
Date Wed, 07 Mar 2007 18:48:41 GMT
Quartz wrote:
> 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 
>
>
>   
You should be able to speed things up quite a bit if you turn autocommit 
off and use a prepared statement for your insert.

Kathey



Mime
View raw message