Attribute

BatchMechanism (BM)

Purpose

Determines the mechanism that is used to execute batch operations.

Valid Values

1 | 2 | 3

Behavior

If set to 1 (SingleRowInsert), the driver executes an insert statement for each row contained in a parameter array. Specify this value if you are experiencing out-of-memory errors when performing batch inserts.

If set to 2 (MultiRowInsert), the driver attempts to execute a single insert statement for all the rows contained in a parameter array. If the size of the insert statement exceeds the available buffer memory of the driver, the driver executes multiple statements. Specify this value for substantial performance gains over 1 (SingleRowInsert) when performing batch inserts.

If set to 3 (Copy), the driver uses the Greenplum COPY command to insert rows into the target table. Specify this value for substantial performance gains over 1 (SingleRowInsert) when performing batch inserts.

Default

1 (SingleRowInsert)

Notes

  • Batch Mechanism determines the mechanism used to perform batch inserts only. For update and delete batch operations, the driver uses the native batch mechanism to handle the request.
  • When BatchMechanism=3, substantial performance gains can be made. However, the following limitations apply:
    • Individual update counts are not returned. However, the total number of inserted rows is returned upon the execution of a batch operation.
    • The entire batch insert is ATOMIC. If any issues are encountered, the entire operation fails and no rows are inserted.

GUI Tab

Advanced tab

See Also

See Performance Considerations for details.