Re: Performance question (stripped down the problem)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matt Block" <matt(at)blockdev(dot)net>
Cc: "'Tille, Andreas'" <TilleA(at)rki(dot)de>, "'PostgreSQL General'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performance question (stripped down the problem)
Date: 2001-09-19 13:55:04
Message-ID: 28138.1000907704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Matt Block" <matt(at)blockdev(dot)net> writes:
> I've not yet looked at the rest of the problem, but doesn't
> ORDER BY make GROUP BY redundant? Just an extra sort?

No. In the first place, there's no extra sort: the planner is well
aware that our current GROUP BY implementation produces ordered output.
In the second place, there's no guarantee that GROUP BY will always
produce ordered output in the future --- we are thinking about changing
over to a hash-table-based implementation of grouping. If you want
ordered output, you should say ORDER BY, not try to outsmart the system.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brent R. Matzelle 2001-09-19 13:57:07 Re: read in to psql from file
Previous Message Andrew Gould 2001-09-19 13:34:11 Re: read in to psql from file