FIX: Suboptimal Performance Using a Cursor to Update a Heap Involved in an Indexed View

Article translations Article translations
Article ID: 282982 - View products that this article applies to.
This article was previously published under Q282982
BUG #: 351566 (SHILOH_bugs)
Expand all | Collapse all


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 the Microsoft Knowledge Base:
290211 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.


Article ID: 282982 - Last Review: October 16, 2003 - Revision: 3.2
  • Microsoft SQL Server 2000 Standard Edition
kbbug kbfix kbsqlserv2000sp1fix KB282982

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from