db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bobko" <r...@ostrich-emulators.com>
Subject Re: database in jar slower?
Date Thu, 30 Nov 2006 21:22:37 GMT
> Hello,
> 
> I'm running an embedded Derby database in my java application. I want
> to use one single file for my database (not the directory with
> seperate files), so I stored it in a jar file and used the derby:jar:
> protocol in the connection url. However, compared to using the
> 'non-jarred' database, my select queries are slower (I don't use
> compression the jar file), is this normal?
> 
> Thanks for the info!
> 
> Best wishes,
> Thomas
> 

I run derby from a CD. I haven't noticed a difference between using a
jar or using a directory, though I suspect the latency from the CD would
hide any.

So, I tried both ways from the HDD in a totally unscientific test
(select * from a table).

>From the jar:
real    0m1.699s
user    0m1.580s
sys     0m0.072s

>From the directory:
real    0m2.026s
user    0m1.704s
sys     0m0.092s

I repeated the test several times with consistent results. Anecdotally,
I'd say the jar is faster.

ry

Mime
View raw message