From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tobias Brox <tobias@nordicbet.com>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: timestamp indexing
Date: Mon, 30 May 2005 13:57:54 -0400
Message-ID: <24839.1117475874@sss.pgh.pa.us> (raw)
In-Reply-To: <20050530170816.GA9222@oppetid.no>
References: <20050530091951.GO26100@tobias.exoweb.net>
<20050530135429.GA78082@winnie.fuhr.org>
<20050530170816.GA9222@oppetid.no>
Tobias Brox <tobias@nordicbet.com> writes:
>> What version of PostgreSQL are you using?
> Also answered in my follow-up - "not yet pg8" :)
Your followup hasn't shown up here yet, but if the query is written like
WHERE timestampcol >= now() - interval 'something'
then the pre-8.0 planner is not capable of making a good estimate of the
selectivity of the WHERE clause. One solution is to fold the timestamp
computation to a constant on the client side.
regards, tom lane
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: tgl@sss.pgh.pa.us, tobias@nordicbet.com, mike@fuhr.org
Subject: Re: timestamp indexing
In-Reply-To: <24839.1117475874@sss.pgh.pa.us>
* 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