grouping

Grouping takes for ever.

I have a query returning 42000 records to Tdblavgrid, and I try to sort but get no result after 4 minutes.
Is it possible that grouping has a max of records in grid it can handle?
Or Am I doing something wrong.

The amount of time needed is determined by the number of groups to create.
If you would have a situation where 42000 groups in a 42000 record grid would have to be created, this will indeed take a lot of time. In more "normal" situations where you have for example 100 groups for 40000 rows, this is done here in a couple of seconds.