Block fetch with scrollable cursors for DRDA
When a Db2 for z/OS® requester uses a scrollable cursor to retrieve data from a Db2 for z/OS server, the following conditions are true.
- The requester never requests more than 64 rows in a query block, even if more rows fit in the query block. In addition, the requester never requests extra query blocks. This is true even if the setting of field EXTRA BLOCKS REQ in the DISTRIBUTED DATA FACILITY PANEL 2 installation panel on the requester allows extra query blocks to be requested.
- The requester discards rows of the result table if the application
does not use those rows.
Example: If the application fetches row n and then fetches row n+2, the requester discards row n+1.
The application gets better performance for a blocked scrollable cursor if it mostly scrolls forward, fetches most of the rows in a query block, and avoids frequent switching between FETCH ABSOLUTE statements with negative and positive values.
- If the scrollable cursor does not use block fetch, the server returns one row for each FETCH statement.