multicolumn index vs two indexes

From: Salvador Mainé <salvamaine(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: multicolumn index vs two indexes
Date: 2001-03-02 19:02:16
Message-ID: 3A9FEE38.725BCE15@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello:

I have a table whith an id field, a date field and 5 millions rows. I
need make queries like

select *on table where id='001' and fecha >='1-1-1999' and fecha
<'1-1-2000';

What is better? To create a multicolumn btree index with (date, id) or
two indexes, one btree for the date and a hash for the id? Where can I
find mor accurate info about indexes? (the manual is a little bit short
of it).

Thanks

--
Salva

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2001-03-02 19:16:25 Re: multicolumn index vs two indexes
Previous Message Richard Bayet 2001-03-02 19:01:29 Re: PL/pgSQL