Ask a question?
  • Contact Us
  • Support Case System
  • Support Forum

What Does OCIPrefetchMemory Do?

OCIPrefetchMemory and OCIPrefetchRows control parameters relating to the Oracle OCI's prefetching facility. However, use of this facility has been disabled in the OpenLink agent and Lite driver because of problems experienced with Oracle 8.x and indicator variables.

To minimize server round trips and maximize performance, the OCI can prefetch result set rows when executing a query. This prefetching operates independently of OpenLink's prefetching facility. The OCI prefetching can be customized by setting two attributes, OCI_ATTR_PREFETCH_ROWS and OCI_ATTR_PREFETCH_MEMORY. The OCIPrefetchMemory and OCIPrefetchRows settings in the OpenLink setup dialogs map directly to these OCI attributes.

OCIPrefetchMemory sets the memory allocated for rows to be prefetched. The application then fetches as many rows as will fit into that much memory.

OCIPrefetchRows sets the number of rows to be prefetched.

When both of these attributes are set, the OCI prefetches rows up to the OCIPrefetchRows limit, or until the OCIPrefetchMemory limit is reached, if this is lower.