April 26, 2013 at 7:09 am
Hi,
Can I use UpdLock hint with fastforward cursor together? From the discussion below, it seems fastforward cursor cannoe update and delete data?
Thanks,
April 26, 2013 at 7:19 am
It's highly likely that the folks here can replace your cursor-based code with a fast, efficient and pretty set-based equivalent - why don't you post your code and let them try? There's a good reason for this. If you are experiencing locking/blocking problems with a slow loop-based process then replacing it with a super-fast set-based version will help and may even eliminate the problem.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
April 26, 2013 at 7:32 am
Sorry, forgot post the link
April 26, 2013 at 7:34 am
Thanks Chris. Actually I am not facing any blocking issue, just try to understand the cursor and locking mechanisim in SQL Server.
April 26, 2013 at 7:36 am
Oh right - ok. In that case, I'll try to track down an excellent article which provides good evidence NOT to use built-in cursor updates but to do it manually instead...
Edit: Here it is.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply