skip to main content

Configuring the client : Configuring the client through CTREE_CONF : <prefetch>

<prefetch>
The prefetch option enables batch record retrieval to improve performance of consecutive sequential reads. This is achieved by retrieving a given number of records (specified by the records attribute) from the server to the client side at the second consecutive sequential read operation. The next sequential read operations do not need to contact the server to retrieve the records as the records are now cached on the client side. Once all the records in the client cache are processed, the next block of records is requested to the server. By default, the records cached on the client side cannot be updated by other users (the allowwriters attribute overrides this default). This avoids situations in which the cached records do not match the records on the server. However, if the file has an implicit or explicit LOCK MODE AUTOMATIC WITH LOCK ON MULTIPLE RECORDS, then all the prefetched records are locked, since these records are retrieved with the same options of the READ NEXT that instigates the read a-head operation.
Prefetching records improves performance of sequential reads in environments where the client and server reside on different systems connected with a network. In such environments any request from the client to the server is sent over the network which is generally a time-expensive operation.
The number of records to prefetch is defined by the records attribute.
Accepted Values
Attributes
Note - It is the programmer's responsibility to ensure that the application does not have issues with prefetched records that have been modified. Enable allowwrites only when data is not critical and/or seldom changes.
Examples
To enable prefetch and set the number of prefetched records to 50:
<prefetch records="50">yes</prefetch>
To enable prefetch and allow prefetched records to be modified by other users:
<prefetch allowwriters="no">yes</prefetch>

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left