What are the challenges you face when working across database platforms? Take the survey
Options

READONLY hint on CURSOR

Hi,

So SQL Prompt puts a hint to say that the cursor could (should?) be read only.  Honestly, this was the first time I heard a cursor could be made read only.  Is this a performance thing ?

Regards,

Alex

Answers

  • Options
    Hi Alex,

    My understanding is that this is indeed suggested for performance.

    A read-only cursor can only move forward through the result set and fetch rows, but it cannot modify the data, so circumstantially (depending on what you're trying to achieve) can help with performance on large result sets.
    Kind regards

    Tom Claringbold | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.