Article ID: 255633 - Last Review: March 14, 2006 - Revision: 2.1 FIX: SET ROWCOUNT or TOP With Partitioned View May Cause Poor PerformanceThis 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
(http://support.microsoft.com/kb/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.
| Article Translations
|
Back to the top
