Re: Postgres does not utilize indexes. Why? - Mailing list pgsql-performance

From Michal Taborsky
Subject Re: Postgres does not utilize indexes. Why?
Date
Msg-id 4122281E.1060402@taborsky.cz
Whole thread Raw
In response to Postgres does not utilize indexes. Why?  (Artimenko Igor <igorart7@yahoo.com>)
List 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 by date:

Previous
From: "olivier HARO"
Date:
Subject: Re: General performance problem!
Next
From: Duane Lee - EGOVX
Date:
Subject: Re: General performance problem!