Re: Repeated execution of identical subqueries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Repeated execution of identical subqueries
Дата
Msg-id 7556.1205385204@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Repeated execution of identical subqueries  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Repeated execution of identical subqueries
Список pgsql-performance
Craig Ringer <craig@postnewspapers.com.au> writes:
> Is there any way to get postgresql to detect such repeated query parts
> and evaluate them only once?

No, not at the moment.  In principle the planner could look for such
duplicates, but it'd be wasted cycles so much of the time that I'd be
loath to do it.

There is work afoot to implement the SQL:2003 "WITH" syntax, which
I think would offer a syntactic solution to your problem.

            regards, tom lane

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

Предыдущее
От: Craig James
Дата:
Сообщение: Benchmark: Dell/Perc 6, 8 disk RAID 10
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Benchmark: Dell/Perc 6, 8 disk RAID 10