db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damien Corbishley" <Damien.Corbish...@uk.intervoice.com>
Subject RE: Extremely slow insert times if large row count
Date Wed, 31 May 2006 10:46:21 GMT
What actual jdbc statements are issued from torque?

We traced our application using pspy database tracing and found a few
"oddities" which we have coded around. Though saying this we never had
an issue with inserts, just with deletes and updates.


Damien

-----Original Message-----
From: Dowell Griffin [mailto:dgriffin@shockwatch.com] 
Sent: 30 May 2006 22:48
To: torque-user@db.apache.org
Subject: Extremely slow insert times if large row count

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.

This e-mail transmission may contain information that is proprietary, privileged and/or confidential
and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention
or disclosure by any person other than the intended recipient or the intended recipient's
designees is strictly prohibited. If you are the intended recipient, you must treat the information
in confidence and in accordance with all laws related to the privacy and confidentiality of
such information.  If you are not the intended recipient or their designee, please notify
the sender immediately by return e-mail and delete all copies of this email, including all
attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message