Re: BUG #2953: index scan, feature request

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2953: index scan, feature request
Дата
Msg-id 13719.1170382671@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2953: index scan, feature request  ("michael" <miblogic@yahoo.com>)
Ответы Re: BUG #2953: index scan, feature request
Список pgsql-bugs
"michael" <miblogic@yahoo.com> writes:
> can these be executed with index seek like what MS SQL does?
> select * from account_category
> where account_category_full_description <> 'MICHAEL'

What for?  A query like that is generally going to fetch the majority of
the table, so an indexscan would be counterproductive.

It could potentially be a win if a very large fraction of the rows had
the exact value MICHAEL ... but the recommended way to deal with that is
to create a partial index with "full_description <> 'MICHAEL'" as the
WHERE clause.

            regards, tom lane

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