Buffering Fetched Rows

When you run a BEGIN-SELECT command, SQR fetches records from the database server. For better performance, SQR fetches them in groups rather than one at a time—by default in groups of 10 records. SQR buffers the records, and a program processes these records one at a time. SQR, therefore, performs a database fetch operation after every 10 records instead of after every single record, which is a substantial performance gain. If the database server is on another computer, network traffic is also significantly reduced.

Modify the number of records to fetch together by using the -B command-line flag or, for an individual BEGIN-SELECT command, by using its -B option. In both cases, specify the number of records to be fetched together. For example, -B100 specifies that records be fetched in groups of 100. This means that the number of database fetch operations is further reduced.

This feature is currently available with SQR for Oracle database and SQR for ODBC.