db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Joseph <...@neurogrid.com>
Subject Batch Inserts
Date Fri, 24 Jan 2003 06:03:15 GMT
Hi all,

I wondered if there was any way of making torque take advantage of batch
inserts ....?

In my application I am often in the situation where I want to do a
series of 10 or so inserts at a time. Looking at the Torque code it
would seem that each insert I perform involves a separate call to the
database. And in fact the village record.save() operation involves an
insert String being constructed each time, and then turned into a
prepared statement.

I may be wrong in some of these details, and it may be that batch
inserts are not common across the different databases:

http://www.mysql.com/doc/en/INSERT.html

and perhaps what I'm really looking for is multistatement transactions
or something similar:

http://www.ca.postgresql.org/docs/aw_pgsql_book/node100.html

Either way round I would be very grateful for any input on how to speed
up the process of making multiple inserts with Torque.

Thanks in advance.

CHEERS> SAM


Mime
View raw message