Article ID: 282982
Article Last Modified on 10/16/2003
APPLIES TO
- Microsoft SQL Server 2000 Standard Edition
This article was previously published under Q282982
BUG #: 351566 (SHILOH_bugs)
SYMPTOMS
Using a cursor to update a table may result in a long execution time under the following circumstances:
- There is an indexed view that involves the table being updated.
- The table being updated does not have a clustered index.
- A cursor is used to perform the update.
CAUSE
An incorrect join order is chosen during the optimization phase.
RESOLUTION
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
WORKAROUND
Any of the following changes will reduce the changes of encountering the problem:
- Rewrite the update query to avoid cursor use.
- Add a clustered index on all underlying tables.
- Remove any unnecessary indexes on the view.
STATUS
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
Additional query words: heap performance response time speed
Keywords: kbbug kbfix kbsqlserv2000sp1fix KB282982