Re: Additional select fields in a GROUP BY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vitaly Belman <vitalib(at)012(dot)net(dot)il>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Additional select fields in a GROUP BY
Date: 2004-06-13 03:39:55
Message-ID: 21366.1087097995@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Vitaly Belman <vitalib(at)012(dot)net(dot)il> writes:
> The problem is that addind them all to GROUP BY causes a performance
> loss.

Really? I'd think that there'd be no visible loss if the earlier
fields of the GROUP BY are already unique. The sort comparison
should stop at the first field that determines the sort order.
Can you provide a self-contained example?

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2004-06-13 13:52:12 Re: Additional select fields in a GROUP BY
Previous Message Vitaly Belman 2004-06-13 03:21:17 Additional select fields in a GROUP BY