SELECT DISTINCT very slow

Поиск
Список
Период
Сортировка
От Ben Harper
Тема SELECT DISTINCT very slow
Дата
Msg-id 6def3e7b0907090809w3b498199mc98308b6984898c4@mail.gmail.com
обсуждение исходный текст
Ответы Re: SELECT DISTINCT very slow
Re: SELECT DISTINCT very slow
Re: SELECT DISTINCT very slow
Список pgsql-general
Hi,
Can anybody explain this:

Records: 600,000
Field Width: Approximately 20 UTF8 characters - type is VARCHAR(25)
Field is Indexed.

SELECT DISTINCT field FROM table;

Takes about 6 seconds. There are 111 distinct items.

On Sqlite, and another place where I have a B+Tree, this query is
faster than my eye can measure.

Is this a well known issue?

Thanks,
Ben

В списке pgsql-general по дате отправления:

Предыдущее
От: leif@crysberg.dk
Дата:
Сообщение: Re: Bug in ecpg lib ?
Следующее
От: Chris Barnes
Дата:
Сообщение: Asking for assistance in determining storage requirements