Microsoft KB Archive/152800

{|
 * width="100%"|

FIX: GROUP BY Clause without Index Executes More Slowly

 * }

Q152800

-

The information in this article applies to:


 * Microsoft SQL Server version 6.0

-

BUG#: 14825

SYMPTOMS
If a Transact-SQL query contains a GROUP BY clause and an index is not defined on the column involved in GROUP BY, the query exhibits better performance when executed on the SQL server with no service packs or service pack 1, as opposed to SQL Servers with service pack 2 installed. This performance anomaly is exhibited only on the Alpha platform.

WORKAROUND
Sort the columns in the GROUP BY clause. Alternately, define an index encompassing the columns involved in the GROUP BY clause and make sure the index is used when grouping the columns in the query.

STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.

Additional query words: GROUP BY clause Alpha index query

Keywords : kbprogramming

Issue type : kbbug kbprb

Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600