Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Database Administration » Starting and Connecting to Your Database » Connection parameters and network protocol options » Connection parameters

 

PrefetchRows connection parameter [PROWS]

Sets the maximum number of rows to prefetch when querying the database.

Usage

Anywhere

Values

Integer

Default

10

200 for ADO.NET

Remarks

Increasing the number of rows prefetched from the database server by the client can improve performance on cursors that only fetch relative 0 or 1, with either single row or wide fetches. Wide fetches include embedded SQL array fetches and ODBC block fetches.

Improvements occur under the following conditions:

  • The application fetches many rows (several hundred or more) with very few absolute fetches.

  • The application fetches rows at a high rate, and the client and server are on the same computer or connected by a fast network.

  • Client/server communication is over a slow network, such as a dial-up link or wide area network.

The number of rows prefetched is limited both by the PrefetchRows (PROWS) connection parameter and the PrefetchBuffer (PBUF) connection parameter, which limits the memory available for storing prefetched rows. See PrefetchBuffer connection parameter [PBUF].

The maximum number of rows that can be prefetched is 1000.

See also
Example

The following connection string fragment sets the number of prefetched rows to 100:

...PrefetchRows=100;...