FIX: Unexpected Results Occur When You Use a Sort and a Stream Aggregate (306893)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q306893
BUG #: 354892 (SHILOH_BUGS)
SYMPTOMS
SQL Server may return unexpected results for a query if all the following conditions are true:
- The query contains an EXISTS clause.
- The optimizer chooses a Merge or a Hash join.
- The query plan uses a Stream Aggregate.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Microsoft 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
HotfixNOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 2.
The English version of this fix should have the following file attributes or later:
Date Time Version Size File name Platform
-----------------------------------------------------------------
08/07/01 01:00 PM 8.00.426 8167 KB s80426i.exe x86 NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files. WORKAROUND
This problem is specific to queries where the query plan contains a Sort operator that outputs a Rank column, followed by a
Stream Aggregate operator with an output list that does not contain the Rank column, followed by a Merge or Hash Join operator.
To work around this problem either:
- Rewrite the query to use JOINs rather than an EXISTS clause.
-or-
- Force a LOOP JOIN by using the OPTION (LOOP JOIN) hint.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000.
This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.
Modification Type: | Major | Last Reviewed: | 10/9/2003 |
---|
Keywords: | kbBug kbfix kbSQLServ2000preSP2Fix KB306893 |
---|
|