Re: is it helpful for the optimiser/planner to add LIMIT 1
| От | Ivan Sergio Borgonovo |
|---|---|
| Тема | Re: is it helpful for the optimiser/planner to add LIMIT 1 |
| Дата | |
| Msg-id | 20080403173254.4852cca7@webthatworks.it обсуждение исходный текст |
| Ответ на | Re: is it helpful for the optimiser/planner to add LIMIT 1 (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: is it helpful for the optimiser/planner to add LIMIT 1
|
| Список | pgsql-general |
On Thu, 03 Apr 2008 10:33:56 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote: > Gregory Stark <stark@enterprisedb.com> 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
В списке pgsql-general по дате отправления: