Mueller, Stephen Ng wrote:
Hi,
I am using emdedded Derby for one of my applications. After calling
connection.open() on the database, the connection is returned promptly
with no problem. However, after this, my CPU usage goes to nearly
100%, and my computer slows down. I can perform inserts on the
database while this is happening, but they take a while. Is Derby
going through some sort of start up procedure? Should it be taking up
this much CPU? It takes about a minute or so before completing, and
my CPU usage returns to normal. Anyone know why this is happening and
how/if I can alleviate the problem? FYI, I am using Derby 10.1.2.1.
Thanks for the help,
Stephen
Hi -
Upon startup Derby loads many classes as it establishes the various
caches and other DBMS management structures. Also, Derby will process
the transaction log if the database was not shutdown cleanly at the end
of the previous boot session.
Some things you could look at: Are you using one of the JVMs Derby is
tested on? If so the problem is probably not slow classloading. Are
there a number of large files in the 'log' directory? This would
indicate that a rollback needs to be performed during the startup process.