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

Поиск
Список
Период
Сортировка
От Seref Arikan
Тема Re: Does it make sense to break a large query into separate functions?
Дата
Msg-id CA+4ThdrRp1=nETOKHDVGnEa3XgbROU=fTuWt7zHDiFAF2ua6uA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Does it make sense to break a large query into separate functions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Thanks Tom, 
I am happy with a 10K feet level discussion of the approach, and your response is just what I was looking for. 

Regards
Seref



On Wed, May 8, 2013 at 3:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Does it make sense to break a large query into separate functions?
Следующее
От: Julian
Дата:
Сообщение: Re: Design advice requested