Re: Planner statistics, correlations - Mailing list pgsql-performance

From Tobias Brox
Subject Re: Planner statistics, correlations
Date
Msg-id 20070112090500.GB16243@oppetid.no
Whole thread Raw
In response to Re: Planner statistics, correlations  ("Peter Childs" <peterachilds@gmail.com>)
Responses Re: Planner statistics, correlations  (Richard Huxton <dev@archonet.com>)
Re: Planner statistics, correlations  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-performance
[Peter Childs - Fri at 08:56:54AM +0000]
> Can you say what state might be rather than what it is not. I'm guess
> that state is an int but there is only a limited list of possible
> states, if you can say what it might be rather than what it is the
> index is more liklly to be used.

  explain select * from events where state in (1,2,3) and event_time<now()

also estimates almost 5k of rows.  I also tried:

  explain select * from events where state=2 and event_time<now()

but get the same behaviour.

Maybe it would help to partitionate the table every year?

pgsql-performance by date:

Previous
From: "Peter Childs"
Date:
Subject: Re: Planner statistics, correlations
Next
From: Richard Huxton
Date:
Subject: Re: [HACKERS] unusual performance for vac following 8.2upgrade