Re: Confirmation of bad query plan generated by 7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Shaun Thomas <sthomas(at)leapfrogonline(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Confirmation of bad query plan generated by 7.4
Date: 2006-06-14 01:50:49
Message-ID: 18667.1150249849@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> On Tue, Jun 13, 2006 at 06:04:42PM -0400, Tom Lane wrote:
>> It'd depend on the context, possibly, but it's easy to show that the
>> current planner does fold "now() - interval_constant" when making
>> estimates. Simple example:

> Turns out the difference is between feeding a date vs a timestamp into the
> query... I would have thought that since date is a date that the WHERE clause
> would be casted to a date if it was a timestamptz, but I guess not...

Hmm ... worksforme. Could you provide a complete test case?

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-06-14 02:04:32 Re: Solaris shared_buffers anomaly?
Previous Message John Vincent 2006-06-14 01:19:26 Re: scaling up postgres