Joe Wilson <[EMAIL PROTECTED]> wrote:
> 
> The old GROUP BY algorithm was extremely efficient whether or 
> not the GROUP BY terms were indexable or not.  
> 

There were cases where the old algorithm performed
very, very poorly.  You have found a case where the
new algorithm performs poorly, though I think the
performance degradation is not nearly as bad as 
some of the pathological cases with the old
algorithm.

I'm sorry the new algorithm displeases you.  I will
make a mental note to try to come up with a better
way to do GROUP BY that always works well.

Please note that going back to the old algorithm is
not an option.  Also note that a new algorithm (or
going back to the old algorithm) is a large change,
requiring weeks of work, and that I have other 
things that will take priority.  So the current 
algorithm seems likely to be your only option for 
the foreseeable future.

In the meantime, you can work around the problem by
implementing the GROUP BY function in your application
code.  Remove the aggregate functions and GROUP BY
clause from your query and just return every row of
the intermediate table, then compute the aggregates
and grouping yourself.  This should be just as fast
as the old algorithm in your case.

--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to