Re: partial index regarded more expensive

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: partial index regarded more expensive
Дата
Msg-id 17714.1123730080@sss.pgh.pa.us
обсуждение исходный текст
Ответ на partial index regarded more expensive  (Tobias Brox <tobias@nordicbet.com>)
Список pgsql-performance
Tobias Brox <tobias@nordicbet.com> writes:
> This query puzzles me:
>   select * from game where game_end>'2005-07-30' and state in (3,4);
> ...
> Now, how can the planner believe the game_by_state-index to be better?

I suspect the problem has to do with lack of cross-column statistics.
The planner does not know that state=4 is correlated with game_end,
and it's probably coming up with some bogus guesses about the numbers
of index rows visited in each case.  You haven't given enough info to
quantify this, though.

            regards, tom lane

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

Предыдущее
От: John A Meinel
Дата:
Сообщение: Re: Speedier count(*)
Следующее
От: "Chun Yit(Chronos)"
Дата:
Сообщение: it is always delete temp table will slow down the postmaster?