Using NOLOCK Hint

Posted in: Microsoft SQL Server, Technical Track
Use NOLOCK hint to avoid block – this is what I have often heard/see in many forums I participate in, during local user group events and meetings. I have always advised that its not that good idea to use hints, as it may cause data corruption and blocking. And anyways, there are many things that you can do to avoid blocking, like:

  1. use sp for everything (almost)
  2. try to avoid using cursor
  3. transaction shouldn’t be too big etc
  4. and, use READPAST hint , I will still say, use this only when you don’t have choice
But these all come from the experience from the field and haven’t anything concrete to quote as reference point until last night, I was googling something and this blog article from Dave, on MSDN Blog showed up. Now, I can quote SQL Server NOLOCK Hint and Other poor ideas as reference to my peers and friends at local user groups, and I am referencing it here for you to read and make note.
I hope this helps.— Hemantgiri S. Goswami

Interested in working with Hemantgiri? Schedule a tech call.

About the Author

Lead Database Consultant
I am a Database Administrator by profession, and a student of a university called life by heart. I am passionate about SQL Server, photography, reading and sharing. Currently, I'm Lead Database Consultant @Pythian. I have been a Microsoft SQL Server MVP for four years, and a published author of the book - SQL Server 2008 High Availability.Keep in touch with me on twitter @ghemant

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *