note 24716 deleted from function.oci-set-prefetch by sixd

From: Date: Fri, 13 Nov 2009 00:21:43 +0000
Subject: note 24716 deleted from function.oci-set-prefetch by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162841@lists.php.net to get a copy of this message
Note Submitter: mlong-php at mlong dot us ---- [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

« previous php.notes (#162841) next »