NumRowsOnFetch IBM data server driver configuration keyword

Specifies the number of rows of data to be returned in a single fetch.

Equivalent CLI keyword
BlockForNRows
Equivalent IBM® data server provider for .NET connection string keyword
BlockForNRows
IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="NumRowsOnFetch" value="<positive integer>"/>
Default setting:
The server returns as many rows as can fit in a query block in a single fetch request.
Usage notes:

The NumRowsOnFetch keyword controls the number of rows of data that is returned to the client in a single fetch request. If the NumRowsOnFetch keyword is not specified, which is the default setting, then as many rows of non-LOB data as can fit in a query block are returned from the server. If the result set contains LOB data, then the behavior NumRowsOnFetch yields can be affected by the EnableLobBlockingOnFetch keyword and the server's support for the blocking of result sets returning LOB data types.

All LOB data that is associated with rows, which fit within a single query block are returned in a single fetch request if the following conditions are met:
  • The NumRowsOnFetch keyword is not specified.
  • The EnableLobBlockingOnFetch keyword is set to 1.
  • The database server supports the blocking of result sets returning LOB data types.

LOB data is described here as being associated with a row because the LOB data of a result set is itself not contained in the row. Instead, the row contains a reference to the actual LOB data.

If the NumRowsOnFetch keyword is set to a positive integer n, then n rows of data are returned in a single fetch request. If the result set contains LOB data and the server supports the blocking of result sets returning LOB data types, then the LOB data that corresponds to the n rows of data is also returned in a single fetch request. If the result set contains LOB data, but the server does not support the blocking of result sets returning LOB data types, then only one row of data, including the LOB data, is returned in a single fetch request.