How to Increase the Key Size Limit of work table.

I have a SQL statement based on 'Group By' Clause and 'Order By' . When I run this query I get this error message

"The current query would generate a key size of 1012 for a work table.  This exceeds the maximum allowable limit of 900"

I know that SQL Server creates a work table for GROUP by clauses internally.

How to increase the Key size of that table.

vssnmurthyAsked:
Who is Participating?
 
Victor SpiridonovConnect With a Mentor Commented:
In SQL server 6.5  composite index can not exceed 900 bytes. It is can not be changed.
0
 
vssnmurthyAuthor Commented:
Edited text of question
0
 
odessaCommented:
try to change 'sort pages' in SQL Server configuration or
do
exec sp_configure 'sort pages', SOME (e.g. 100)

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.