Re: Timestamp indexes aren't used for ">="

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Timestamp indexes aren't used for ">="
Date: 2001-11-12 14:36:21
Message-ID: 20011112063355.I74385-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, 12 Nov 2001, Jeff Boes wrote:

> In article <20011109145054(dot)H59285-100000(at)megazone23(dot)bigpanda(dot)com>,
> "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com> wrote:
>
> > How many rows are in the table? Have you run vacuum analyze?
>
> Sorry, that information was in the original post, but perhaps you missed
> it:
>
> In article <9shhnf$23ks$1(at)news(dot)tht(dot)net>, "Jeff Boes" <jboes(at)nexcerpt(dot)com>
> wrote:
>
> > We have a table which has approximately 400,000 rows. It has 17 columns,
> > and 4 indexes. The primary key is a int4 (filled by a sequence),
> > additionally we have two more int4 indexes and a timestamp index.
>
> Yes, VACUUM ANALYZE gets run every 24 hours, and currently the table
> grows by some 25K-40K rows per day. Could a factor be the time elapsed
> between the VACUUM and the query?

Is the 40000 row estimate for the number selected correct? If so, then
index scan may very well be a losing plan for this query. Does the forced
index scan actually take less time than the the sequence scan?

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Aleksander Kopanchuk 2001-11-12 15:56:19 installing
Previous Message Nick Fankhauser 2001-11-12 14:00:10 Re: to many connection