FIX: Suboptimal Performance Using a Cursor to Update a Heap Involved in an Indexed View
This article was previously published under Q282982
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 351566 (SHILOH_bugs)
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.
An incorrect join order is chosen during the optimization phase.
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 theMicrosoft Knowledge Base:
INF: How to Obtain the Latest SQL Server 2000 Service Pack
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.
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
heap performance response time speed
Article ID: 282982 - Last Review: 01/16/2015 21:21:22 - Revision: 3.2
Microsoft SQL Server 2000 Standard Edition
- kbnosurvey kbarchive kbbug kbfix kbsqlserv2000sp1fix KB282982