way to speed up a SELECT DISTINCT? - Mailing list pgsql-performance

From Seth Ladd
Subject way to speed up a SELECT DISTINCT?
Date
Msg-id F0B89090-FB05-11D7-A8D2-000A9576D038@picklematrix.net
Whole thread Raw
Responses Re: way to speed up a SELECT DISTINCT?  (Peter Childs <blue.dragon@blueyonder.co.uk>)
List pgsql-performance
Hello,

I am running 7.3.2 RPMs on RH9, on a celeron 1.7 w/ 1gig ram.

I have a table that has 6.9 million rows, 2 columns, and an index on
each column.  When I run:

SELECT DISTINCT column1 FROM table

It is very, very slow (10-15 min to complete).  An EXPLAIN shows no
indexes are being used.

Is there any way to speed this up, or is that DISTINCT going to keep
hounding me?

I checked the mailing list, and didn't see anything like this.

Any tips or hints would be greatly appreciated.  Thanks for your help!
Seth


pgsql-performance by date:

Previous
From: Peter Childs
Date:
Subject: Re: Speeding up Aggregates
Next
From: Peter Childs
Date:
Subject: Re: way to speed up a SELECT DISTINCT?