Re: sequential scan on select distinct

Поиск
Список
Период
Сортировка
От Ole Langbehn
Тема Re: sequential scan on select distinct
Дата
Msg-id 200410061809.43549.ole@freiheit.com
обсуждение исходный текст
Ответ на Re: sequential scan on select distinct  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
Список pgsql-performance
Am Mittwoch, 6. Oktober 2004 12:19 schrieb Pierre-Frédéric Caillaud:
>  You could try :
>
>  explain analyze select "land" from "customer_dim" group by "land";
>  It will be a lot faster but I can't make it use the index on my machine...
this already speeds up my queries to about 1/4th of the time, which is about
the range of mysql and oracle.
>
>  Example :
>
> [..]
>
>  Hum hum ! Again, a lot better !
>  Index scan backwards seems a lot faster than index scan forwards. Why, I
> don't know, but here you go from 15 seconds to 14 milliseconds...
thanks for this very extensive answer, it helped me a lot.
>
>  I don't know WHY (oh why) postgres does not use this kind of strategy
> when distinct'ing an indexed field... Anybody got an idea ?
That's the big question I still would like to see answered too. Can anyone
tell us?

TiA
--
Ole Langbehn

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

Предыдущее
От: Bill Montgomery
Дата:
Сообщение: Re: Excessive context switching on SMP Xeons
Следующее
От: Greg Stark
Дата:
Сообщение: Re: sequential scan on select distinct