INSENSITIVE CURSOR

  • Hi

    We are doing UPDATEs inside a cursor.

    We wanted Declare this cursor as INSENSIVE CURSOR to improve the performance of the cursor to tackle with high-volumes of data UPDATES.

    Does it really improves the cursor performance by adding INSENSITIVE keyword to the cursor declaration?

    SQL BOL says, Adding INSENSITIVE keyword makes the cursor read-only.

    Any thoughts are welcome.

    Thanks in advance

  • May in crease the tempdb size intially but should have less potential locking issues.

  • Insensitive cursors are read only. Hence updates to the table needs to be done explicitly using the update statements. Using cursors for updating records in large numbers is not a good practice. As mentioned in the previous comment for insensitive cursors a temprorary table is created in the tempdb and thus lead to resource contention in case of HUGE number of records. Look at forward or fast forward cursors if the data is sequential

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply