FIX: SET ROWCOUNT or TOP With Partitioned View May Cause Poor Performance

Article translations Article translations
Article ID: 255633 - View products that this article applies to.
This article was previously published under Q255633
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 55537(SQLBUG_70)
Expand all | Collapse all

SYMPTOMS

If you use the SET ROWCOUNT option or TOP keyword to limit results, a SELECT on partitioned views takes longer because it introduces extra SPOOL in the query execution plan. This only happens if the view is defined on a large number of tables in the same or different database. Using the SHOWPLAN option, you can identify the extra SPOOL:
|--Table Spool
        |--Clustered Index
 Scan(OBJECT:([DATABASE1].[dbo].[TABLE1].[index_0]))
        |--Clustered Index
 .
 .
 .
        |--Clustered Index  Scan(OBJECT:([DATABASEn].[dbo].[TABLE1].[index_0]))
				

WORKAROUND

Reducing the number of partitions results in CONCAT instead of SPOOL and provides better performance.

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.

Properties

Article ID: 255633 - Last Review: October 20, 2013 - Revision: 2.1
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB255633

Contact us for more help

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