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 <vitalyb@gmail.com>
Cc: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-performance@postgresql.org
Subject: Re: Additional select fields in a GROUP BY
Date: Sun, 13 Jun 2004 13:59:24 -0400
Message-ID: <26742.1087149564@sss.pgh.pa.us> (raw)
In-Reply-To: <fa96e3c604061310354113e9f8@mail.gmail.com>
References: <2393942843.20040613062117@012.net.il>
	<20040613135212.GA3260@wolff.to>
	<fa96e3c604061310354113e9f8@mail.gmail.com>

Vitaly Belman <vitalyb@gmail.com> writes:
> Notice that the GROUP BY items added the following to the plan:

>               ->  Sort  (cost=10454.67..10600.83 rows=58466 width=47)
>                     Sort Key: s.series_id, s.series_name, s.series_picture

Oh, I see: in the first case you need no sort at all because the output
of the indexscan is already known to be sorted by s.series_id.  I was
thinking of a sort with more or fewer sort columns, but that's not the
issue here.

			regards, tom lane



view thread (5+ messages)

Message-ID: <26742.1087149564@sss.pgh.pa.us>
Permalink:  ../26742.1087149564@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26742.1087149564@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, vitalyb@gmail.com, bruno@wolff.to
  Subject: Re: Additional select fields in a GROUP BY
  In-Reply-To: <26742.1087149564@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