ocistatementtype> <ociserverversion
Last updated: Fri, 13 Nov 2009

ocisetprefetch

(PHP 4, PHP 5, PECL OCI8 >= 1.0.0)

ocisetprefetchSinônimo de oci_set_prefetch()

Descrição

Esta função é um apelido para: oci_set_prefetch().



User Contributed Notes
ocisetprefetch
mlong-php at mlong dot us
27-Aug-2002 12:32
[Editor's note: if you set it to 2, PHP fetches 3 rows because the prefetch count is the number of extra rows fetched]

If you set this to 2, then PHP would fetch 2 rows from the database at a time and only need to make half as many calls to the database. If you set it to 3 then 1/3 as many calls, etc. Basically this tells how many rows to retrieve at a time from the server (they will be cached so you'll still only get one at a time in your program). The drawback would be as one person already stated...the higher the number the more memory will be used. You would call this right after your parse, and before any fetch or execute. In practice this should improve performance but I haven't noticed any difference regardless of what values I put in though I am using a SQLNet interface to RDB so that may be it (for example, prefetch will not work with Oracle 7). You may have better luck than I.  If you want further info try searching in google for OCI_ATTR_PREFETCH_ROWS

ocistatementtype> <ociserverversion
Last updated: Fri, 13 Nov 2009