Re: Indexes? - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Indexes?
Date
Msg-id 20041202072351.GA61374@winnie.fuhr.org
Whole thread Raw
In response to Indexes?  (Bjørn T Johansen <btj@havleik.no>)
List pgsql-general
On Thu, Dec 02, 2004 at 07:11:29AM +0100, Bjørn T Johansen wrote:

> I have a table where I need to use "..where curdate between fromDate and
> toDate".
> Is it best to have two indexes, one for FromDate and one for toDate or just
> one index for both the fields?

You could try it both ways and use EXPLAIN ANALYZE to see which
results in a faster plan, if that's what you mean by "best."

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Adding Reply-To: to Lists configuration ...
Next
From: "Marc G. Fournier"
Date:
Subject: Re: [HACKERS] Adding Reply-To: to Lists