pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim C. Nasby <jnasby@pervasive.com>
Cc: Shaun Thomas <sthomas@leapfrogonline.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Confirmation of bad query plan generated by 7.4
Date: Tue, 13 Jun 2006 21:50:49 -0400
Message-ID: <18667.1150249849@sss.pgh.pa.us> (raw)
In-Reply-To: <20060613223950.GK34196@pervasive.com>
References: <9119.1150222168@sss.pgh.pa.us>
	<448EDFC4.8F27.00A9.0@leapfrogonline.com>
	<20060613211347.GB34196@pervasive.com>
	<10918.1150236282@sss.pgh.pa.us>
	<20060613223950.GK34196@pervasive.com>

"Jim C. Nasby" <jnasby@pervasive.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



view thread (19+ messages)  latest in thread

Message-ID: <18667.1150249849@sss.pgh.pa.us>
Permalink:  ../18667.1150249849@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18667.1150249849@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jnasby@pervasive.com, sthomas@leapfrogonline.com
  Subject: Re: Confirmation of bad query plan generated by 7.4
  In-Reply-To: <18667.1150249849@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