By default the OCI fetch calls retrieve one row at a time from the database. This is fine for small result sets, but you incur A LOT of sql*net/database overhead if you are returning a large result set.
The solution is to use OCISetPrefetch to grab more than one row at a time from the database into the internal PHP buffer that holds the rows. The fetches that you perform against the database will still return one row, just as they did before. You don't have to code any differently. The next time you do a fetch, PHP doesn't have to ask the database for it, it is simply retrieved from the local buffer.
Your goal is to set this value to approximately the same size as your average result set. Setting it too high results in a waste of memory, and setting it to low results in too much database activity.
By setting this value properly you can achieve dramatic speedups on data rich pages. Experiment with the values a bit and I am sure you will find the call to be one of the most important OCI functions you will use.