Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: timestamp indexing


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: Tobias Brox <tobias(at)nordicbet(dot)com>
  • Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-performance(at)postgresql(dot)org
  • Subject: Re: timestamp indexing
  • Date: Mon, 30 May 2005 13:57:54 -0400
  • Message-id: <24839.1117475874@sss.pgh.pa.us> <text/plain>

Tobias Brox <tobias(at)nordicbet(dot)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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group