Could you please explain the difference between
TOraQuery.FetchRows and
TOraQuery.Options.Prefetchrows ?
The documentation doesn't tell much.
Which one has to be increased to speed up fetch performance?
Fetchrows versus Prefetchrows
-
heidenbluth
- Posts: 56
- Joined: Mon 08 Nov 2004 19:01
- Location: Germany
Hello,
TOraQuery.FetchRows sets the number of rows that will be transferred across the network at the same time. You should choose the optimal value of the FetchRows property for each SQL statement and software/hardware configuration experimentally.
TOraQuery.Options.Prefetchrows sets the number of rows that OCI prefetches when executing a query. Setting a value greater than 0 for this option minimizes server round trip count, that increases the application performance.
For example, if the Prefetchrows property is set to 0 and the FetchRows property is set to 25, then the number of requests to the server will be 4+1 for 100 records, but if Prefetchrows is set to 1, the number of requests will be 4. But some queries can return invalid rows count when prefetch is enabled.
TOraQuery.FetchRows sets the number of rows that will be transferred across the network at the same time. You should choose the optimal value of the FetchRows property for each SQL statement and software/hardware configuration experimentally.
TOraQuery.Options.Prefetchrows sets the number of rows that OCI prefetches when executing a query. Setting a value greater than 0 for this option minimizes server round trip count, that increases the application performance.
For example, if the Prefetchrows property is set to 0 and the FetchRows property is set to 25, then the number of requests to the server will be 4+1 for 100 records, but if Prefetchrows is set to 1, the number of requests will be 4. But some queries can return invalid rows count when prefetch is enabled.