Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

What is NOLOCK?

Add comment
Views: 61
Votes: 0
Comments: 0

Using the NOLOCK query optimizer hint is generally considered good practice in order to improve concurrency on a busy system. When the NOLOCK hint is included in a SELECT statement, no locks are taken when data is read. The result is a Dirty Read, which means that another process could be updating the data at the exact time you are reading it. There are no guarantees that your query will retrieve the most recent data. The advantage to performance is that your reading of data will not block updates from taking place, and updates will not block your reading of data. SELECT statements take Shared (Read) locks. This means that multiple SELECT statements are allowed simultaneous access, but other processes are blocked from modifying the data. The updates will queue until all the reads have completed, and reads requested after the update will wait for the updates to complete. The result to your system is delay (blocking).
Others in this Category
document Q: What is pseudo columns ? Name them?
document Q: What is an execution plan? When would you use it? How would you view the execution plan?
document What is User Defined Functions? What kind of User-Defined Functions can be created?
document What’s the difference between a primary key and a unique key?
document Q: Explain the concept of NULL
document What is difference between DELETE & TRUNCATE commands?
document What is NOT NULL Constraint?
document What is Catalog Views?
document What is Service Broker?
document What is CHECK Constraint?
» More articles



RSS