Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining a row lock
Message
From
24/07/2003 17:17:10
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00813006
Message ID:
00813308
Views:
7
Thanks Mike. I appreaciate the feedback.

I get used to doing things in a certain way for VFP, then switch to SQL and I'm wondering if i'm missing something somewhere.

Setting the flag looks like the way I'll be going.

Take care,
Anthony

>I have never been a fan of solutions that rely on pessimistic locking. They always seem to lead to concurrency issues and performance problems.
>
>Remember that SQL Server uses locks when it's reading data so if you were to set your isolation level to REPEATABLE READ or SERIALIZABLE, you'd be holding the SELECT locks on rows and index keys until the transaction terminates. This is probably the problem that you're seeing in your testing.
>
>Would it be possible to process the data in blocks of rows instead of a single row? Fall back to the idea of creating a flag in the row. "Lock" the rows by setting the flag and then return them to the client. Let the client do the calculations for each row and then write all the updates to all rows. Then release the "lock."
>
>-Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform