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 <vitalyb(at)gmail(dot)com>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Additional select fields in a GROUP BY
Date: 2004-06-13 17:59:24
Message-ID: 26742.1087149564@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Vitaly Belman <vitalyb(at)gmail(dot)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

In response to

pgsql-performance by date

Next:From: ThanksDate: 2004-06-14 09:12:25
Subject: pg_fetch_array
Previous:From: Vitaly BelmanDate: 2004-06-13 17:35:36
Subject: Re: Additional select fields in a GROUP BY

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