Re: Confirmation of bad query plan generated by 7.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Confirmation of bad query plan generated by 7.4
Дата
Msg-id 18843.1150251204@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Confirmation of bad query plan generated by 7.4  ("Shaun Thomas" <sthomas@leapfrogonline.com>)
Список pgsql-performance
"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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Solaris shared_buffers anomaly?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: scaling up postgres