db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petrula, Dan" <DPetr...@thezenith.com>
Subject RE: does Derby has some form of performance problem ?
Date Wed, 08 Nov 2006 21:54:08 GMT
In response to the startup issue, I am running Derby in the embedded mode
only in compiled form. My program boots
up in less than 5 seconds. This includes loading two dll's one of which is
the compiled version of the Derby
jar. On subsequent program boots, the time is 1 second. I have noticed one
difference however. I originally
developed the product using MYSQL. Record retreival was almost
instantaeously completed. There is ,however, a slight
delay using Derby the first time the table is accessed. However, subsequent
retreivals are achieved with no 
noticeable delay. I have not test Derby with a data as large as 100MB so I
can't comment on start time under that 
scenario. I would suggest putting the initial loading of the driver in its
own thread and let the rest of the
application program load. However, I have not noticed any difference either
way.
I am running this application in Windows XP with 512K of memory. I think the
start up delay is the result of 
incorrect loading of the driver. Further, you have to tell derby where to
find the database using the Properties
object.


Dan

-----Original Message-----
From: Olav Sandstå [mailto:olavsa@gmail.com] 
Sent: Tuesday, November 07, 2006 12:21 AM
To: Derby Discussion
Subject: Re: does Derby has some form of performance problem ?


On 04/11/06, legolas wood <legolas.w@gmail.com> wrote:
> so it is not normal that it takes 30 seconds for a system with one 
> 100MB database ?

No, it should not be normal that it takes 30 seconds to start Derby. I have
done a small test where I inserted 100MB of data into Derby and did a proper
shutdown. In a new JVM I started Derby again and measured the time it took
to load the embedded driver and getting the first connection to the
database, ie. the time the following two lines of code takes:

   Class.forName(driver).newInstance();
   Connection conn = DriverManager.getConnection(jdbcUrl);

I repeated this experiment 10 times and in all cases it took between 1.0
seconds and 1.1 seconds to start Derby (to run the two lines above). This
was done a on Pentium 4 desktop PC.

I do not think the startup time should be much influenced by the size of the
database given that you do a proper shutdown.

Regards,
Olav

Mime
View raw message