Re: Indexes?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Bjørn T Johansen <btj(at)havleik(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Indexes?
Date: 2004-12-02 07:23:51
Message-ID: 20041202072351.GA61374@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

  • Indexes? at 2004-12-02 06:11:29 from Bjørn T Johansen

Browse pgsql-general by date

  From Date Subject
Next Message Chris Green 2004-12-02 08:44:22 Re: Upcoming Changes to News Server ...
Previous Message Vincent Hikida 2004-12-02 07:16:48 Re: Indexes?