pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vitaly Belman <vitalib@012.net.il>
Cc: pgsql-performance@postgresql.org
Subject: Re: Additional select fields in a GROUP BY
Date: Sat, 12 Jun 2004 23:39:55 -0400
Message-ID: <21366.1087097995@sss.pgh.pa.us> (raw)
In-Reply-To: <2393942843.20040613062117@012.net.il>
References: <2393942843.20040613062117@012.net.il>

Vitaly Belman <vitalib@012.net.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



view thread (5+ messages)  latest in thread

Message-ID: <21366.1087097995@sss.pgh.pa.us>
Permalink:  ../21366.1087097995@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21366.1087097995@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, vitalib@012.net.il
  Subject: Re: Additional select fields in a GROUP BY
  In-Reply-To: <21366.1087097995@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox