Re: Does Oracle encourage developers to use cursors?

From: Jonathan Lewis <>
Date: Sat, 27 Oct 2012 11:36:04 +0100
Message-ID: <>

  • Original Message ----- From: "Harry Tuttle" <>
    | But isn't any result that is returned to the client technically some kind
    of "cursor"?

Yes - some kind. (At least, when thinking of select statements).

| The server has to built up a cursor and then return the rows in there to
the client.

This demonstrates why it's worth asking about SQL Server "cursors". For simple select statements there isn't a "there" for rows to be "in" - they are acquired dynamically and read-consistently as needed. A cursor, in Oracle, is not a pre-built result set waiting to be transferred to the client. If that is the implementation in SQL Server then that's one reason why cursors may (sometimes) be less efficient than one might hope. (Select for update, and some selects with order by or group by clauses may require completely pre-built result sets to be acquired, of course.)


Jonathan Lewis

Author: Oracle Core (Apress 2011) Received on Sat Oct 27 2012 - 12:36:04 CEST

Original text of this message