Re: Convincing the query planner to play nice

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Convincing the query planner to play nice
Дата
Msg-id CAMkU=1yVwN=3OqsV+Z_zSkXGtw2=vD62tcOUtW=o5eAMaPcpxw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Convincing the query planner to play nice  (Tim Kane <tim.kane@gmail.com>)
Список pgsql-general
On Sat, Aug 10, 2013 at 5:24 PM, Tim Kane <tim.kane@gmail.com> wrote:


>
> Again, just thinking out loud here..   In a scenario where specific
> clustering isn't an option...
> I wonder if the query planner should consider the physical
> distribution/ordering of values on disk, and use that as a factor when
> applying the random_page_cost in the QEP's?

It does do that, based on the "correlation" column in pg_stats.
However, because your original random_page_cost is already very close
to seq_page_cost, this adjustment doesn't have a huge effect in your
case.  I don't know how much of an effect it would have even then,
because of the range overlap issue that Tom mentions.

Cheers,

Jeff


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Please help
Следующее
От: Brian Hirt
Дата:
Сообщение: View permission error after upgrading from 8.4 -> 9.2