BatchMechanism
- Last Updated: November 15, 2021
- 1 minute read
- DataDirect Connectors
- JDBC
- Amazon Redshift 6.0
- Documentation
Purpose
Determines the mechanism that is used to execute batch operations.
Valid Values
nativeBatch | multiRowInsert
Behavior
If set to nativeBatch, the driver uses the data store's native batch
mechanism to execute batch operations. NativeBatch returns individual update counts for each
statement or parameter set in the batch.
If set to multiRowInsert, the driver uses a parameterized multi-row insert
statement to execute batch inserts. MultiRowInsert returns only the total number of update
counts in the batch, but provides substantial performance gains when performing batch
inserts.
Notes
MultiRowInsert only applies to Insert statements for batch executes called with PreparedStatement objects. If a command other than the Insert statement is used, the driver uses the native batch mechanism to execute the command.
Data Source Method
public String getBatchMechanism()
public void setBatchMechanism(String)
Default
multiRowInsert
Data Type
String