note 24716 added to function.ocisetprefetch
| From: | mlong-php at mlong dot us | Date: | Tue, 27 Aug 2002 00:32:39 +0000 |
| Subject: | note 24716 added to function.ocisetprefetch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-35693@lists.php.net to get a copy of this message | ||
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
--
http://www.php.net/manual/en/function.ocisetprefetch.php
http://master.php.net/manage/user-notes.php?action=edit+24716
http://master.php.net/manage/user-notes.php?action=delete+24716
http://master.php.net/manage/user-notes.php?action=reject+24716