Re: Slow Count-Distinct Query

Поиск
Список
Период
Сортировка
От Varadharajan Mukundan
Тема Re: Slow Count-Distinct Query
Дата
Msg-id CACKkDGFM1+L0ZNJh19isYwK45QhMfVi8x2F0sPOaHu+mHqLezQ@mail.gmail.com
обсуждение исходный текст
Ответ на Slow Count-Distinct Query  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-performance
Hi Jeff,

Instead what I get is the index only scan (to provide order) feeding into a Group.

That's interesting. We tested out in two versions of Postgres (9.2 and 9.3) in different Mac machines and ended up with index-only scan only after the partial index. I remember doing a vacuum full analyse after each and every step.
 
I usually get this plan without the cluster, to.  I think it depends on the luck of the sampling in the autoanalyze.


That's interesting as well. I think something like increasing the sample size would make it much better? Because, we had to perform so many steps to get the index-only scan working whereas its really obvious for anyone to guess that it should be the right approach. Also in a far corner of my mind, i'm also thinking whether any OS specific parameter would be considered (and is different in your system compared to my system) for coming up plans and choosing one of them.

--
Thanks,
M. Varadharajan

------------------------------------------------

"Experience is what you get when you didn't get what you wanted"
               -By Prof. Randy Pausch in "The Last Lecture"

My Journal :- www.thinkasgeek.wordpress.com

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

Предыдущее
От: PARIS Nicolas
Дата:
Сообщение: Re: PGSQL 9.3 - Materialized View - multithreading
Следующее
От: Johann Spies
Дата:
Сообщение: The same query - much different runtimes