Re: Unexpected sequential scan on an indexed column

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unexpected sequential scan on an indexed column
Дата
Msg-id 25265.1258326350@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Unexpected sequential scan on an indexed column  (Eddy Escardo-Raffo <eescardo@kikini.com>)
Список pgsql-performance
Eddy Escardo-Raffo <eescardo@kikini.com> writes:
> Do you guys have any idea why this is not working as I expect?

Datatype issue maybe?  When I try what seems to be the same case here
I get the expected indexscan, so I'm thinking the problem is that
the comparison isn't indexable, which is a possibility if the location
column isn't actually integer.

The fact that it's estimating 1000000 rows out is also extremely
suspicious --- it might or might not get the exact "2" estimate,
but I'd sure expect it to know that the majority of rows don't match.

            regards, tom lane

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

Предыдущее
От: Eddy Escardo-Raffo
Дата:
Сообщение: Unexpected sequential scan on an indexed column
Следующее
От: david@lang.hm
Дата:
Сообщение: Re: limiting performance impact of wal archiving.