db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Nielsen <Thomas.Niel...@Sun.COM>
Subject Re: Accessing embedded database in JAR file
Date Thu, 09 Aug 2007 05:27:54 GMT
David Leader wrote:
> While I mention this, could I perhaps raise the remaining speed problem. 
> I made a Derby database with one table, two fields and two tuples (can't 
> get much smaller) and am running it unzipped from a java app that has 
> the simplest gui with a menu with the two fields as menu items and a 
> text area for results. After the GUI has opened the first query takes 
> perhaps five or ten seconds, whereas the subsequent ones are 
> 'instantaneous'. Anyone know why?


My initial guess is those few seconds on the first query are your 
initialization cost - that is, starting the derby engine (if embedded), 
loading the driver and setting up the jdbc connection, and then getting 
the first statement through.

On a small db, five secs sounds like a lot - but still very possible.

Does it take that long to start if you use ij as well? Does it make a 
difference wether you run embedded or not?

Thomas Nielsen

View raw message