Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group