Hello Everyone,I never used NOLOCK hint with select command, I have following question.If I issue NOLOCK hint on one of the Table[Table1] inside my select statement, will it be applied to other select statements issued against Table1 as well? or will it be limited to my select statement only. I want to make sure that, once I issue NOLOCK hint on Table1, Other user/application who is running Select statements against Table1 should not have NOLOCK, otherwise I am gone!!!... Please reply..Thanks in advance.RP
Hi. The NOLOCK hint will be used only for the query which has the hint. Please make sure you are fully aware of the risks related to this particular hint. Thanks, Varsham
The WITH options (hints) are applied to a single table (index) in a single query. They're part of the SELECT syntax, and so they only affect the isolated query statement in which they occur. Alternatively, you might add SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED before a query (or series of queries). SET options affect only the current connection (but not any preceding query statements that have already been executed).
I routinely use With (NoLock) hints whenever I can (i.e. dirty reads permitted). It's especially beneficial with very active OLTP databases and can lead to better query performance. For more information, check out Books Online: http://msdn.microsoft.com/en-us/library/ms187373(SQL.90).aspx