Article ID: 276060 - View products that this article applies to.
This article was previously published under Q276060
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 58305 (SQLBUG_70)
A SELECT statement that contains an ORDER BY clause may not return results in the specified sort order if the query is run in parallel on a computer with two or more processors.
You can determine if the query is being run in parallel by viewing the execution plan. To obtain the execution plan, execute SET SHOWPLAN_TEXT ON in a separate batch before the query. For example:
A parallel plan contains the word "Parallelism" in the execution plan output; the following example demonstrates this:
|--Parallelism(Repartition Streams, PARTITION COLUMNS:([fvs].[FileID])) | | | | | | |--Index Seek(OBJECT:([LBDB2].[dbo].[FileVersion].[IX_FileVersion_MSNFV] AS [fvs]), SEEK:([fvs].[MirrorSN] <= [@msn]) ORDERED) | | | | | |--Parallelism(Repartition Streams, PARTITION COLUMNS:([f].[ID])) | | | | | |--Clustered Index Seek(OBJECT:([LBDB2].[dbo].[File].[PK_File] AS [f]), SEEK:([f].[DriveVSN]=1083842463) ORDERED) | | | | |--Parallelism(Repartition Streams, PARTITION COLUMNS:([fv].[FileID]))
To prevent the specific query from having a parallel plan, specify the MAXDOP option with a value of 1. For example, on the Pubs database:
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799For more information, contact your primary support provider.
(http://support.microsoft.com/kb/274799/ )INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, see the following sections in SQL Server Books Online:
"Parallel Query Example"
"Parallel Query Processing"
"Degree of Parallelism"
Contact us for more help
Connect with Answer Desk for expert help.