From: Francois Deliege <fdeliege@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Distinct + Limit
Date: Tue, 27 Mar 2012 13:37:51 -0700 (PDT)
Message-ID: <5833589.541.1332880671745.JavaMail.geo-discussion-forums@pbbnv8> (raw)
Hi group,
I have the following table with millions of rows
CREATE TABLE table1
(
col1 text,
col1 text,
doc text
)
select col1 from table1 group by col1 limit 2;
select distinct on (col1) col1 from table1 limit 2;
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: fdeliege@gmail.com
Subject: Re: Distinct + Limit
In-Reply-To: <5833589.541.1332880671745.JavaMail.geo-discussion-forums@pbbnv8>
* 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