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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seref Arikan <serefarikan(at)kurumsalteknoloji(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does it make sense to break a large query into separate functions?
Date: 2013-05-08 14:05:17
Message-ID: 21958.1368021917@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Seref Arikan <serefarikan(at)kurumsalteknoloji(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Seref Arikan 2013-05-08 14:09:01 Re: Does it make sense to break a large query into separate functions?
Previous Message Albe Laurenz 2013-05-08 14:02:58 Re: question on most efficient way to increment a column