AcuServer includes a multiple-record mode designed for programs that read a large number of sequential records without user interruption, such as when you are generating a report. Rather than reading one record at a time, AcuServer returns multiple records in a single network request, dramatically improving performance. Files opened in this mode are optimized for sequential reading, but have restrictions placed on the types of operations they can do. See File Limitations for more information.
To use multiple-record mode, specify the name of the file to be opened in this mode using the runtime configuration variable, filename_MRC (multiple-record count). You can then specify the number of records to be sent in each packet in the filename_MRC variable on the client, or you can set this variable to 1 and specify the number of records to send using the server configuration variable MULTIPLE_RECORD_COUNT. See filename_MRC and MULTIPLE_RECORD_COUNT for more information.
Only files open in modes that do not require record locking can use multiple-record mode. Files that are opened in EXCLUSIVE I/O mode or open INPUT are good candidates. Note that this only affects files that read records, so files opened OUTPUT or EXTEND cannot use this mode.
In multiple-record mode, the client caches records that are read from the server. The first time a client does a READ NEXT, the server actually sends multiple records to the client. Until that collection of records has been processed, there is no more communication between the client and the server for future READ NEXT operations.
There are some exceptions to these general rules. When the client executes a random READ, the server sends only a single record. The next time the client executes a READ NEXT, the server sends a full set of records.