Distinct + Limit

From: Francois Deliege <fdeliege(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Distinct + Limit
Date: 2012-03-27 20:37:51
Message-ID: 5833589.541.1332880671745.JavaMail.geo-discussion-forums@pbbnv8
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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;

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Dave Crooke 2012-03-27 20:40:32 Re: Linux machine aggressively clearing cache
Previous Message Claudio Freire 2012-03-27 20:10:27 Re: Linux machine aggressively clearing cache