Re: Postgres does not utilize indexes. Why?

Поиск
Список
Период
Сортировка
От Michal Taborsky
Тема Re: Postgres does not utilize indexes. Why?
Дата
Msg-id 4122281E.1060402@taborsky.cz
обсуждение исходный текст
Ответ на Postgres does not utilize indexes. Why?  (Artimenko Igor <igorart7@yahoo.com>)
Список pgsql-performance
Artimenko Igor wrote:
>   id int8 NOT NULL DEFAULT nextval('next_id_seq'::text) INIQUE,

ID column is bigint, but '50000' is int, therefore the index does not
match. You need to cast your clause like this:

select id from test where id = 50000::int8

Also, issue VACUUM ANALYZE, so Postgres knows about the structure of the
data.

--
Michal Taborsky
http://www.taborsky.cz


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

Предыдущее
От: "olivier HARO"
Дата:
Сообщение: Re: General performance problem!
Следующее
От: Duane Lee - EGOVX
Дата:
Сообщение: Re: General performance problem!