skip to main content
Connection Property Descriptions : ArrayFetchSize
  

Try DataDirect Drivers Now

ArrayFetchSize

Purpose

Specifies the number of fields the driver uses to calculate the maximum number of rows for a fetch. When executing a fetch, the driver divides the ArrayFetchSize value by the number of columns in a particular table to determine the number of rows to retrieve. By determining the fetch size based on the number of fields, the driver can avoid out of memory errors when fetching from tables containing a large number of columns while continuing to provide improved performance when fetching from tables containing a small number of columns.

Valid Values

-x | x
where:
-x
is a negative integer.
x
is a positive integer.

Behavior

If set to -x, the driver overrides any settings on the statement level and uses the number of fields specified by the absolute value of -x to calculate the number of rows to retrieve.
If set to x, the driver uses the number of fields specified by the value of x to calculate the number of rows to retrieve. However, the driver will not override settings, such as setFetchSize(), on the statement level.

Example

If this property is set to 20000 fields and you are querying a table with 19 columns, the driver divides the number of fields by the number of columns to calculate the number of rows to retrieve. In this example, the driver would retrieve approximately 1053 rows per fetch.

Notes

You can improve performance by increasing the value specified for this option. However, if the number of fields specified exceeds the available buffer memory on the server, an out of memory error will be returned. If you receive this error, decrease the value specified until fetches are successfully executed.

Data Source Method

setArrayFetchSize

Default

20000 (cells)

Data Type

Int

See also

Performance Considerations