Re: SQLFunctionCache and generic plans - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: SQLFunctionCache and generic plans
Date
Msg-id CAFj8pRD-JcaGCktoWqGTt7TEb1zgENajVQwuhbHFfSMRH7+XPw@mail.gmail.com
Whole thread Raw
In response to SQLFunctionCache and generic plans  (Ronan Dunklau <ronan.dunklau@aiven.io>)
Responses Re: SQLFunctionCache and generic plans
List pgsql-hackers
hI

I can confirm 60% speedup for execution of function fx and fx3 - both functions are very primitive, so for real code the benefit can be higher

Unfortunately, there is about 5% slowdown for inlined code, and for just plpgsql code too.

I tested fx4

create or replace function fx4(int) returns int immutable as $$ begin return $1 + $1; end $$ language plpgsql;

and fx2

create or replace function fx2(int) returns int as $$ select 2 * $1; $$
language sql immutable;

and execution of patched code is about 5% slower. It is strange so this patch has a negative impact on plpgsql execution.

Regards

Pavel

pgsql-hackers by date:

Previous
From: Nikolay Shaplov
Date:
Subject: Re: [PATCH] New [relation] option engine
Next
From: Robert Haas
Date:
Subject: Re: Anti join confusion