>In your example, the bottleneck is calling the function f1. So you need to >check only this function. It is not important if other functions or >>procedures do database lookups.
>Or if it does just one database lookup, then you can use SQL language. I >repeat, PL/pgSQL is not good for ultra very frequent calls (where >there is >minimal other overhead). >Generally, start of function or start of query are more expensive on Postgres >than on Oracle. Postgres is much more dynamic, and it needs >to do some >rechecks. The overhead is in nanoseconds, but nanoseconds x billions are lot >of seconds Thank you Pavel, for all the information. That was very helpful. Regards Daniel