Luis Vargas <[EMAIL PROTECTED]> writes:
> At the backend, I'm measuring the cost of executing (via SPI_execute_plan) 
> the read-only plan of a simple query with no reference to tables. E.g. 
> simpleplan(int) AS SELECT $1 > 5

> Executing this plan via SPI_execute takes around 70% more time than 
> directly executing the relevant operator function (int4gt) and using 
> DatumGetBool.

Only that much?  I'd have expected it to be several hundred times
slower, considering that int4gt is an utterly trivial function and
executor startup/shutdown is a fairly heavyweight operation.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to