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 myfunction(3,5) limit 1;
select into a,b x,y from tablename where z=5 and u=7 limit 1;
select a,b from from tablename where z=5 and u=7 limit 1;
thx
--
Ivan Sergio Borgonovo
http://www.webthatworks.it