FIX: Prefetching of Rows by Bookmark Lookup May Not Release Locks in Read Committed Isolation (250345)
The information in this article applies to:
This article was previously published under Q250345
BUG #: 57204 (SQLBUG_70)
SYMPTOMS
Under the Read Committed isolation level, if the execution plan of a SELECT statement chooses to do a Bookmark Lookup, Intent Shared (IS) or Shared (S) locks may not be released after the execution of the SELECT statement has completed.
For this behavior to occur, the following three conditions must be true:
- The base table must have a clustered index and a non-clustered index.
- Selected columns must include at least one column that does not have an index.
- The SELECT statement must elect to return the data through the non-clustered index bookmark. This commonly occurs with the use of ORDER BY and LIKE clauses.
CAUSE
While prefetching rows from the base table, the Bookmark Lookup does not release the locks held on the base table.
WORKAROUND
To work around this problem, avoid performing SELECT operations while in a transaction or use an index hint to force the clustered index. For example, you can do the following to force the clustered index:
select * from (index = 1) TEST1 order by C2
STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0 For more information, contact your primary support provider.
Modification Type: | Major | Last Reviewed: | 3/14/2006 |
---|
Keywords: | kbBug kbfix KB250345 |
---|
|