way to speed up a SELECT DISTINCT?

Поиск
Список
Период
Сортировка
От Seth Ladd
Тема way to speed up a SELECT DISTINCT?
Дата
Msg-id F0B89090-FB05-11D7-A8D2-000A9576D038@picklematrix.net
обсуждение исходный текст
Ответы Re: way to speed up a SELECT DISTINCT?  (Peter Childs <blue.dragon@blueyonder.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Peter Childs
Дата:
Сообщение: Re: Speeding up Aggregates
Следующее
От: Peter Childs
Дата:
Сообщение: Re: way to speed up a SELECT DISTINCT?