Search Postgresql Archives

Re: is it helpful for the optimiser/planner to add LIMIT 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 03 Apr 2008 10:33:56 -0400
Tom Lane <tgl@xxxxxxxxxxxxx> wrote:

> Gregory Stark <stark@xxxxxxxxxxxxxxxx> 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?

Does I have to take it as:
if it is not declared as SETOF all optimisation and planning marvels
will happen without I add LIMIT 1?

What about queries?
Is it an information that is used for anything else other than
stopping earlier?

Summarising it up: is it worth to add it here and there as an
optimisation flag?

thanks


-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux