Re: Does it make sense to break a large query into separate functions?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Does it make sense to break a large query into separate functions?
Дата
Msg-id 21958.1368021917@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Does it make sense to break a large query into separate functions?  (Seref Arikan <serefarikan@kurumsalteknoloji.com>)
Ответы Re: Does it make sense to break a large query into separate functions?  (Seref Arikan <serefarikan@kurumsalteknoloji.com>)
Re: Does it make sense to break a large query into separate functions?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Seref Arikan <serefarikan@kurumsalteknoloji.com> writes:
> I've just noticed that some parts of the autogenerated queries can be
> functions on their own. Would moving these parts to their own functions
> help the query planner?

It's difficult to answer that without a lot more detail than you've
provided, but my offhand guess would be "no".  Usually it's better
when the planner can expand functions inline, which would just be
reversing the transformation you're thinking of.

            regards, tom lane


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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: question on most efficient way to increment a column
Следующее
От: Seref Arikan
Дата:
Сообщение: Re: Does it make sense to break a large query into separate functions?