Two indexes on same column

From: Vlastimil Krejcir <krejcir(at)ics(dot)muni(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: Two indexes on same column
Date: 2011-07-20 09:09:03
Message-ID: Pine.GSO.4.64.1107201101240.13966@dior.ics.muni.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

what index is used (and according to what rules) when there are two (or
more) different indexes defined on one column? Assume:

CREATE TABLE example (
id SERIAL PRIMARY KEY,
...);
CREATE INDEX example_id_idx ON example USING hash (id);

By default there are btree index created and the hash index is then
created. So there are two indexes on column "id". Are there described
somewhere what index is used and when? Does it depend on query analyzer
and planner?

Thanks

Vlastik

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raghavendra 2011-07-20 09:29:34 Re: Two indexes on same column
Previous Message MS Rao 2011-07-20 09:03:00 Re: Programmer ( Postgres), Milwaukee - offsite-Remote - onsite