Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The use of NOLOCK
Message
From
17/02/2009 02:58:37
 
 
To
17/02/2009 02:56:59
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01382232
Message ID:
01382286
Views:
41
>In all likelyhood you're using automatic transactions currently, with no or little chance that an update, delete or insert is rejected.
>In this situation the chance of NOLOCK returning records of transactions that are not completed is about zero.
>
>The NOLOCK hint is one that is frequently overlooked. For statistical purposes there is seldom a reason not to use it. Unless you're trying to run a long lasting query in an mission critical OLTP environment it does not hurt to set it off. For most applications (such a disconnected web applications) it is not mission critical that a query ones in a few thousand queries might contain a record that was updated, deleted or inserted during the query execution. If the query is on a flat table (not querying on primarykeys - forreign keys relationship) it does not pose a problem either.
>
>Only in certain situations where for example in a transaction the parent was deleted, but the child not yet or the parent was inserted but not all the childs yet, the query would return inaccurate results if executed when those transactions are executing in parrallel.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform