FIX: Aggregations in Parallel Query May Generate Incorrect Results (277738)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q277738
BUG #: 58334 (SQLBUG_70)

SYMPTOMS

A query with aggregations may return incorrect results when a parallel query plan is chosen to do the aggregations. The following example shows part of a simplified parallel query plan chosen to do aggregations:
|--Stream Aggregate(GROUP BY:(...) ...)
     |--Parallelism(Gather Streams)
          |--Stream Aggregate(GROUP BY:(...) ...)
               |--Bookmark Lookup(BOOKMARK:([Bmk1000]), OBJECT:(...) ...)
                    |--Parallelism(Distribute Streams)
				

WORKAROUND

You can work around this problem in the following ways:
  • Disable parallel plan generation globally for the entire server by setting the max degree of parallelism option to 1 through the sp_configure system stored procedure.

    NOTE: To disable parallel plan generation through sp_configure, you must enable the show advanced options configuration setting:
    sp_configure 'show advanced options', 1
    reconfigure with override
    go
    sp_configure 'max degree of parallelism', 1
    reconfigure with override
    go
    						
    -or-
  • Disable the creation of a parallel plan by using the OPTION (MAXDOP 1) query hint for the statement that is experiencing the problem.

STATUS

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:

274799 INF: How to Obtain Service Pack 3 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 KB277738