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
In response to
pgsql-performance by date
|Next:||From: Bricklen Anderson||Date: 2005-05-30 22:00:37|
|Subject: Re: poor performance involving a small table|
|Previous:||From: Tom Lane||Date: 2005-05-30 17:15:08|
|Subject: Re: Postgresql and xeon. |