Re: Postgres Optimizer is not smart enough?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgres Optimizer is not smart enough?
Дата
Msg-id 4337.1105583973@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Postgres Optimizer is not smart enough?  (Mark Kirkwood <markir@coretech.co.nz>)
Ответы Re: Postgres Optimizer is not smart enough?  (Mark Kirkwood <markir@coretech.co.nz>)
Список pgsql-performance
Mark Kirkwood <markir@coretech.co.nz> writes:
> I happen to have some debugging code enabled for the optimizer, and the
> issue appears to be that the costs of paths using these indexes are
> quite similar, so are quite sensitive to (some) parameter values.

They'll be exactly the same, actually, as long as the thing predicts
exactly one row retrieved.  So it's quasi-random which plan you get.

btcostestimate needs to be improved to understand that in multicolumn
index searches with inequality conditions, we may have to scan through
tuples that don't meet all the qualifications.  It's not accounting for
that cost at the moment, which is why the estimates are the same.

            regards, tom lane

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

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Postgres Optimizer is not smart enough?
Следующее
От: Joe Conway
Дата:
Сообщение: Re: PostgreSQL vs. Oracle vs. Microsoft