Re: Planner statistics, correlations

From: Tobias Brox <tobias(at)nordicbet(dot)com>
To: Peter Childs <peterachilds(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Planner statistics, correlations
Date: 2007-01-12 09:05:00
Message-ID: 20070112090500.GB16243@oppetid.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2007-01-12 09:06:40 Re: [HACKERS] unusual performance for vac following 8.2upgrade
Previous Message Peter Childs 2007-01-12 08:56:54 Re: Planner statistics, correlations