From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joseph Shraibman <jks@selectacast.net>
Cc: Stephan Szabo <sszabo@kick.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: possible bug with group by?
Date: Wed, 24 May 2000 22:59:58 -0400
Message-ID: <19251.959223598@sss.pgh.pa.us> (raw)
In-Reply-To: <392C63FF.F0186004@selectacast.net>
References: <392C5819.2FD488A8@selectacast.net>
<029101bfc5d6$09f3a960$0c64010a@kick.com>
<392C63FF.F0186004@selectacast.net>
Joseph Shraibman <jks@selectacast.net> writes:
> But why would group by need to sort it? To insert it into a tree to
> make lookups of distinct values faster?
No, to bring identical values together. GROUP BY and DISTINCT are both
implemented as basically a "sort | uniq" pipeline.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, jks@selectacast.net, sszabo@kick.com
Subject: Re: possible bug with group by?
In-Reply-To: <19251.959223598@sss.pgh.pa.us>
References: <392C5819.2FD488A8@selectacast.net> <029101bfc5d6$09f3a960$0c64010a@kick.com> <392C63FF.F0186004@selectacast.net> <19251.959223598@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