[PERFORM] function call vs staright query

2007-03-17 Thread Vincenzo Romano
Hi all. I'm experiencing a strange behaviour with 8.1.8 (cannot do upgrades to 8.2 at the moment). On a 13+ million rows table I can do a query with results back in less than 100 ms. Result is a set of bigint. But when I encapsulate that query into an "SQL" function with three parameters the resu

Re: [PERFORM] function call vs staright query

2007-03-17 Thread Vincenzo Romano
Hi all again. I've seen that there has been another post similar to mine: http://archives.postgresql.org/pgsql-performance/2007-03/msg00166.php I understand that the query planner has less infos about the query at the time the function is defined / loaded. In my case in the query there is a "fiel