"Ivan Sergio Borgonovo" <[EMAIL PROTECTED]> writes:
> Summarising it up: is it worth to add it here and there as an
> optimisation flag?
Probably not. Unless you're not planning on reading all the resulting records
anyways and want the planner to optimize with that assumption.
--
Gregory Star
On Thu, 03 Apr 2008 10:33:56 -0400
Tom Lane <[EMAIL PROTECTED]> wrote:
> Gregory Stark <[EMAIL PROTECTED]> writes:
> > You could fix that more cleanly with "ALTER FUNCTION myfunction
> > ROWS 1" but only if that's always true, not just for
> > myfunction(3,5).
>
> Perhaps the function shouldn't b
Gregory Stark <[EMAIL PROTECTED]> writes:
> You could fix that more cleanly with "ALTER FUNCTION myfunction ROWS 1" but
> only if that's always true, not just for myfunction(3,5).
Perhaps the function shouldn't be declared SETOF in the first place?
regards, tom lane
--
S
"Ivan Sergio Borgonovo" <[EMAIL PROTECTED]> writes:
> I'm reviewing some function I wrote to add stable, immutable where
> needed and I'd like to take the chance to add further "cheap"
> optimisation if it helps.
>
> There are many places where I know a function or a statement will
> return just o
I'm reviewing some function I wrote to add stable, immutable where
needed and I'd like to take the chance to add further "cheap"
optimisation if it helps.
There are many places where I know a function or a statement will
return just one row?
Is it helpful to add LIMIT 1?
eg.
select a, b from myf