pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Salvador Mainé <salvamaine@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: multicolumn index vs two indexes
Date: Fri, 02 Mar 2001 18:02:16 -0100
Message-ID: <3A9FEE38.725BCE15@yahoo.com> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <3A9FEE38.725BCE15@yahoo.com>
Permalink:  ../3A9FEE38.725BCE15@yahoo.com/
Also on:    postgresql.org/message-id/3A9FEE38.725BCE15@yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: salvamaine@yahoo.com
  Subject: Re: multicolumn index vs two indexes
  In-Reply-To: <3A9FEE38.725BCE15@yahoo.com>
  References: <3A9FEE38.725BCE15@yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox