Re: Surprised by index choice for count(*)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Surprised by index choice for count(*)
Дата
Msg-id 31534.1525191072@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Surprised by index choice for count(*)  (Rob Sargent <robjsargent@gmail.com>)
Ответы Re: Surprised by index choice for count(*)  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
Rob Sargent <robjsargent@gmail.com> writes:
> Should I be?  I would have thought the pk would have been chosen v. 
> function index?

If I'm reading this correctly, the PK index contains uuids while
the fpv index contains float4s, meaning the latter is probably half
the size.  So scanning it is a lot cheaper, at least according to
the planner's cost model.

            regards, tom lane


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Surprised by index choice for count(*)
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: Surprised by index choice for count(*)