pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tobias Brox <tobias@nordicbet.com>
To: Peter Childs <peterachilds@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Planner statistics, correlations
Date: Fri, 12 Jan 2007 10:05:00 +0100
Message-ID: <20070112090500.GB16243@oppetid.no> (raw)
In-Reply-To: <a2de01dd0701120056p37f1906excd71068468e5769a@mail.gmail.com>
References: <20070112081631.GA10636@oppetid.no>
	<a2de01dd0701120056p37f1906excd71068468e5769a@mail.gmail.com>

[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?



view thread (8+ messages)  latest in thread

Message-ID: <20070112090500.GB16243@oppetid.no>
Permalink:  ../20070112090500.GB16243@oppetid.no/
Also on:    postgresql.org/message-id/20070112090500.GB16243@oppetid.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tobias@nordicbet.com, peterachilds@gmail.com
  Subject: Re: Planner statistics, correlations
  In-Reply-To: <20070112090500.GB16243@oppetid.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox