Multiple settting of prefetch is very interesting
Harrison Picot, September 18, 2001 - 12:19 am UTC
Thanks Tom, resetting prefetch in the middle of the code points out an interesting ability. I am not sure where it will come in handy but everything seems to. The example is really good, a reminder of how to test. Prefetch is definitely a valuable tool, both for traffic reasons on high speed connections, and time on low speed. This is much better than the documentation, which give prefetch short shrift.
Thanks.
Mike
Mike Cameron, September 15, 2008 - 11:27 pm UTC
Hi Tom,
This is an old thread but is very relevent to my question:
DB: 8.1.7.4
Pro*C: 8.1.7
Does the PREFETCH option have the same / better / worse impact of including a ROWNUM on the cursor statement...?
I.e.
=================================
exec sql declare c1 cursor for select empno from emp A where rownum <= 201;
exec sql declare c2 cursor for select empno from emp B;
exec oracle option( prefetch=201 );
exec sql open c1;
for( ;; )
{...
......
=================================
Thanks in advance,
Mike
September 16, 2008 - 10:21 pm UTC
it would not matter - if the cursor with or without the rownum returned 201 records that is.
rownum won't make prefetch go faster, or slower.