Re: [SQL] Is it normal that functions are so much faster than inline queries

2004-04-01 Thread Olivier Hubaut
On Wed, 31 Mar 2004 10:33:20 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: "Olivier Hubaut" <[EMAIL PROTECTED]> writes: When I want to execute this set of queries in a function: ... It takes only 2 seconds. But when I tried to do it directly in the psql term (replacing the $1 value with the same use

Re: [SQL] Is it normal that functions are so much faster than inline queries

2004-03-31 Thread Tom Lane
"Olivier Hubaut" <[EMAIL PROTECTED]> writes: > When I want to execute this set of queries in a function: > ... > It takes only 2 seconds. > But when I tried to do it directly in the psql term (replacing the $1 > value with the same used in the function call), I'm obliged to kill the > second q

[SQL] Is it normal that functions are so much faster than inline queries

2004-03-31 Thread Olivier Hubaut
I'm doing some test on our PgSQL 7.3.4 and I can't believe what I see: When I want to execute this set of queries in a function: DELETE FROM oly.amaze_log_report WHERE batch = $1 ; INSERT INTO oly.amaze_log_report SELECT $1, 'DATA', 'MISSING_NEWREF_DECLARATION', 'ERROR', tmp.error_count, 'Miss