ArrayInsertSize
- Last Updated: September 22, 2017
- 1 minute read
- DataDirect Connectors
- JDBC
- Apache Hive 6.0
- Documentation
Purpose
Specifies the number of fields the driver uses to calculate the maximum number of rows sent in a packet when executing a multi-row insert. When executing a multi-row insert, the driver divides the ArrayInsertSize value by the number of columns in a particular insert statement to determine the number of rows to send in a packet. By determining the packet size based on the number of fields, the driver can avoid out of memory errors when executing inserts containing a large number of columns while continuing to provide improved performance when executing inserts containing a small number of columns.
In most scenarios, the default setting for ArrayInsertSize provides
the ideal driver behavior; however, you may need to reduce the value specified if
you encounter either of the following:
- Performance or memory issues when inserting a large number of rows that contain large values.
- The following error when inserting a large number of rows
when using Apache Knox:
HTTP/1.1 500 Server Error.
Valid Values
xwhere:
- x
- is a positive integer representing the number of fields.
Data Source Method
setArrayInsertSize
Default
20,000 (fields)
Data Type
Int