DB2 Version 9.7 for Linux, UNIX, and Windows

BlockForNRows CLI/ODBC configuration keyword

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

db2cli.ini keyword syntax:
BlockForNRows = <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 BlockForNRows keyword controls the number of rows of data that are returned to the client in a single fetch request. If BlockForNRows is not specified (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 BlockForNRows yields can be affected by the BlockLobs CLI/ODBC configuration keyword and the server's support for blocking of result sets returning LOB data types.

All LOB data associated with rows that fit completely within a single query block are returned in a single fetch request if:
  • BlockForNRows is not specified,
  • BlockLobs is set to 1 and
  • the server supports 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 BlockForNRows is set to a positive integer n, then n rows of data will be returned in a single fetch request. If the result set contains LOB data and the server supports blocking of result sets returning LOB data types, then the LOB data that corresponds to the n rows of data will also be returned in the single fetch request. If the result set contains LOB data, but the server does not support blocking of result sets returning LOB data types, then only one row of data, including the LOB data, will be returned in a single fetch request.