db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dowell Griffin" <dgrif...@shockwatch.com>
Subject Extremely slow insert times if large row count
Date Tue, 30 May 2006 21:47:32 GMT
Suggestions/Comments on on this:
 
I have been using Torque in an application for over 2 years with no
problems.  A new table in the application may have as many as 1 million rows
in it.  I am experimenting to see how it will perform (insert times
especially).  I have confirmed the database, hsqldb 1.8.0.2, is fine with
row counts near 1 million.  The insert time using Java
Statement.executeUpdate() to insert and Statement.executeQuery() to retrieve
the auto-assigned primary key is under one-half of a millisecond (both
insert and getting the key combined).   However if I use Torque
BaseObject.save() to do this the insert time is around 15 seconds (yes
seconds, not milliseconds!)   .  What the heck is going on?  I even found
where the generated code was using a transaction and removed that.  There
was no significant change.
 
As a note: I will probably use MySQL in produciton for several reasons. 
 
AND: Suggestions about table design are not really applicable since I have
no performance problems when not using Torque.  I am hoping there is some
setting in Torque I need to change.....       There is an auto-generated
primary key and one other index comprised of 4 columns.
 
I can see the Torque insert time degrade as the table gets larger.
 
Environment:
 
Windows 2003 server
Torque 3.2
hsqldb 1.8.0.2
Plenty of memory and disk space.  Over 1GB of *free* memory while the test
is running.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message