Subject Re: [firebird-support] Performance of long GROUP BY clause
Author Ann W. Harrison
Rick Debay wrote:
> Are you planning on using FB 2?
> Select *
> From
> (select from Atable a group by
> join descriptive_table d on d.Atable_id =
> I'd make the main query a view if it were useful elsewhere (although
> views are hard to maintin in firebird) and then this kind of join could
> be done in FB 1.5 as well.

A problem is that joins of views with groups are not done particularly
efficiently in 1.5. maybe this one will be done correctly in 2.0 - I
haven't tried. The advantage of using the (less elegant) aggregates
on string fields with a 1:1 correspondence with grouping fields is that
the performance impact is approximately nothing. I doubt that the
optimizer is good enough to notice that the whole join is unnecessary
and the field values requested are already produced by the initial