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

Re: Confirmation of bad query plan generated by 7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Shaun Thomas" <sthomas(at)leapfrogonline(dot)com>
Cc: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Confirmation of bad query plan generated by 7.4
Date: 2006-06-14 02:13:24
Message-ID: 18843.1150251204@sss.pgh.pa.us (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-performance
"Shaun Thomas" <sthomas(at)leapfrogonline(dot)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

In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2006-06-14 02:24:41
Subject: Re: scaling up postgres
Previous:From: Tom LaneDate: 2006-06-14 02:04:32
Subject: Re: Solaris shared_buffers anomaly?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group