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

"Shaun Thomas" <sthomas@leapfrogonline.com> writes:
> I can see the planner not liking the results of a function,
> but a variable?  That's a static value!

Read what you wrote, and rethink...

If you're desperate you can construct a query string with the variable
value embedded as a literal, and then EXECUTE that.  This isn't a great
solution since it forces a re-plan on every execution.  We've
occasionally debated ways to do it better, but no such improvement will
ever appear in 7.4 ;-)

			regards, tom lane



view thread (19+ messages)  latest in thread

Message-ID: <18843.1150251204@sss.pgh.pa.us>
Permalink:  ../18843.1150251204@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18843.1150251204@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, sthomas@leapfrogonline.com, jnasby@pervasive.com
  Subject: Re: Confirmation of bad query plan generated by 7.4
  In-Reply-To: <18843.1150251204@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