Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: benchmarking, which statement is faster
Very good point, and worth raising.
However, there is an argument that says:
or conversely
b) You do care if there is more than one row
in which case your explicit version would have to do the explicit second fetch anyway, leaving you with the same cost as the automaticsecond fetch on the implicit cursor.
-- Jonathan Lewis Host to The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Author of: Practical Oracle 8i: Building Efficient Databases See http://www.jlcomp.demon.co.uk/book_rev.html Seminars on getting the best out of Oracle See http://www.jlcomp.demon.co.uk/seminar.html Screensaver or Lifesaver: http://www.ud.com Use spare CPU to assist in cancer research. Keith Boulton wrote in message ...Received on Thu Jul 26 2001 - 06:22:28 CDT
>
>"Thomas Kyte" <tkyte_at_us.oracle.com> wrote in message
>news:9jnb6c0c3k_at_drn.newsguy.com...
>
>>
>> Until and unless you can post an example of any case where explicit
cursors beat
>> an implicit cursor.... I am suspicious of your conclusion.
>>
>
>You can generate an unreasonable example. The implicit cursor performs a
>second fetch. This means if you look for a single row via a full-table
scan,
>the entire table will be scanned every time whereas with an explicit
cursor,
>on average, only half the table will be scanned. It is un entirely unreal
>situation, but one for which you can easily engineer a test case.
>
>
>
![]() |
![]() |