Home > PHP > Function > OCI8 > oci_set_prefetch()

oci_set_prefetch()

oci_set_prefetch - Sets number of rows to be prefetched by queries

Syntax

bool oci_set_prefetch (resource $statement, int $rows)

Arguments

  • statement - A valid OCI8 statement identifier created by oci_parse() and executed by oci_execute(), or a REF CURSORstatement identifier.
  • rows - The number of rows to be prefetched, >= 0

Description

Sets the number of rows to be buffered by the Oracle Client libraries after a successful query call to oci_execute() and for each subsequent internal fetch request to the database. For queries returning a large number of rows, performance can be significantly improved by increasing the prefetch count above the default oci8.default_prefetchvalue.

Version

PHP 5, PECL OCI8 >= 1.1.0

Return value

Returns TRUE on success or FALSE on failure.