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



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q255633
BUG #: 55537(SQLBUG_70)

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.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB255633