• I can't see the screenshot. A screenshot is pretty useless anyway. Actual text would be much better.

    But, in short, here's the approach I recommend:

    1) encode the large varchar columns to int values using a text_values conversion table.

    2) create new columns to contain the encoded values.

    3) cluster the table in the proper sequence based on your usage / needs. This is the critical factor.

    4) Do the Group By on the int values, with a final outer query to lookup the actual (original) text values.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.