>>One more idea.
>>
>>Get the current result into a temp table, add index on PK and ChildPK fields (Or index on PK and include ChildPK - may be better) and then try group by.
>
>Yes, that is the next thing to do. I would have liked to avoid that as I would have wanted one SQL to do it all.
Can you compare the actual execution plans with and without group by to find out what takes that long?
If it's not broken, fix it until it is.
My Blog