Was this helpful?
Batch Query Execution
Queries now can be executed in batch. Batch statement execution improves communication performance between the client and the DBMS Server. Batched statements that are run against an Ingres Star server may see less performance benefit.
A group of statements can be sent to the server, where they are executed, and then the correct number of responses is sent back to the client. This feature is restricted to queries that return either a response or a row count, but no data.
Statements allowed in batched queries include INSERT, DELETE, and statements that return no data, such as CREATE TABLE. SELECT statements and row-producing procedures are not allowed in batched queries.
To take advantage of batch query execution, Java programmers can use the addBatch and executeBatch methods, which are supported in Ingres JDBC. OpenAPI programmers can use the new function, IIapi_batch().
Batched statements that use repeated dynamic INSERT statements (for example, through Java-based Extract Transfer and Load tools) are specially optimized to improve performance.
If the DBMS does not support batch processing, the Ingres JDBC driver detects it and automatically executes the statements individually.
Even for servers that support batch processing, if you discover a difference in behavior between individual statement execution and batch execution and you want to force individual statement execution, you can use the ingres.jdbc.batch.enabled system property to disable batch query execution. For more information, see the ingres.jdbc.batch.enabled property in the Connectivity Guide.
We recommend not using autocommit with batch execution. If batch execution is used with autocommit, and you cancel the batch execution, it is impossible to tell which statements were committed.
Note:  Embedded SQL does not yet support batch query execution.
For more information, including guidelines on how to boost performance using this feature, see the Connectivity Guide and OpenAPI User Guide.
Last modified date: 11/28/2023