Subject RE: [Firebird-Java] Maximum number of items in batch
Author Rick DeBay
> There is no performance improvement [with Jaybird] in using
executeBatch() compared to simple executeUpdate().

Is this a Firebird engine limitation? On other databases, we had large
measurable improvements, due to less wire traffic and the work being
batched on the server.
For example, the jnetDirect JDBC driver for SQL Server would send all
the parameters across in one go, the server would churn, and then the
result would come back.
I don't know the Firebird APIs. Can a list of parameters be sent to the
server, or must they be sent one at a time?

-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Tuesday, March 15, 2005 3:29 PM
To: Firebird-Java@yahoogroups.com
Subject: Re: [Firebird-Java] Maximum number of items in batch



> Is there an approximate number of items that may be executed in a
> PreparedStatement batch? I know it's less than 160,000 as that many
> items cause an OutOfMemory error somewhere inside executeBatch() :-)

Only your memory. The addBatch() method stores your parameters in
collection
(also if you use BLOBs, their content is held in memory). In
executeBatch()
it simply loops through the collection and executes each statement.
There is
no performance improvement in using executeBatch() compared to simple
executeUpdate(). The method is there only to provide a JDBC
compatibility
and to ease migration.

Roman




Yahoo! Groups Links