Re: Deciding which index to use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Deciding which index to use
Дата
Msg-id 18555.1415745078@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Deciding which index to use  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-hackers
Christophe Pettus <xof@thebuild.com> writes:
> Where in the optimizer code does PostgreSQL decide which of several possibly-matching partial indexes to use?

It costs them all out and uses the cheapest.

If the cost estimates come out exactly the same, you get an arbitrary
choice (I think probably always the index with smallest OID, but that's
an implementation artifact rather than something that's done explicitly
anywhere).
        regards, tom lane



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

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Deciding which index to use
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: Column/type dependency recording inconsistencies