Re: A question about plans and multi-key pks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A question about plans and multi-key pks
Дата
Msg-id 37752.1430498597@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A question about plans and multi-key pks  (Steve Rogerson <steve.pg@yewtc.demon.co.uk>)
Список pgsql-general
Steve Rogerson <steve.pg@yewtc.demon.co.uk> writes:
> Why does the plan come up with 67 rows, when by definition there can be at
> most one as we are searching on the pk?

The rowcount estimate is made by combining selectivities of the WHERE
conditions; what you're seeing is a consequence of not having very good
knowledge about cross-column correlations.  The actual details of the plan
(ie, that the pkey index can be used) are determined much later.

            regards, tom lane


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

Предыдущее
От: Steve Rogerson
Дата:
Сообщение: A question about plans and multi-key pks
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: pg_dump permssion denied problem