PrefetchBuffer connection parameter [PBUF]

Sets the maximum amount of memory for buffering rows, in bytes.

Usage

Anywhere

Values
Integer [ k | m ]
Default

512 KB (524288) all platforms except Windows Mobile

64 KB (65536 bytes) Windows Mobile

Remarks

The PrefetchBuffer (PBUF) connection parameter controls the memory allocated on the client to store prefetched rows. The value is in bytes, but you can use k or m to specify units of kilobytes or megabytes, respectively. This connection parameter accepts values between 64 KB and 8 MB.

In some circumstances, increasing the number of prefetched rows can improve query performance. You can increase the number of prefetched rows using the PrefetchRows (PROWS) and PrefetchBuffer (PBUF) connection parameters.

Increasing the PrefetchBuffer (PBUF) connection parameter also increases the amount of memory used to buffer GET DATA requests. This may improve performance for some applications that process many GET DATA (SQLGetData) requests.

For compatibility with previous versions, if a value less than 16384 is specified, it is interpreted as kilobytes.

Using kilobytes without the k suffix in the PrefetchBuffer connection parameter is deprecated. See PrefetchRows connection parameter [PROWS].

See also
Examples

The following connection string fragment could be used to determine if the PrefetchBuffer memory limit is reducing the number of prefetched rows.

...PrefetchRows=100;LogFile=c:\client.txt

The following string could be used to increase the memory limit to 256 KB:

...PrefetchRows=100;PrefetchBuffer=256k