Subject Re: [Firebird-Java] Maximum number of items in batch
Author Roman Rokytskyy
> 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