db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: use batch execution for PreparedStatement
Date Thu, 15 May 2008 08:26:01 GMT
> I must insert many rows(e.g. 2.000-5.000) in a table. If I do this with
save
> funktion from torque it is not perfomant.

Is it much worse than plain SQL ? Did you aquire a connection beforehand
and use the same connection for all saves to avoid connection overhead
(think about the transaction type you want when doing this) ?

> Also it doesn`t work with a
> subselect, because the data comes from a other database. Now I had the
idea to
> do this with the BatchExcution of PreparedStatement. Can I do this with
torque?

I would not know how. But plain JDBC is easy in this case, just nmake sure
to use finally blocks to close the jdbc connection. You can use Torque to
do the select on the other database.

     Thomas


---------------------------------------------------------------------
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