Most of the functions that we have in the DB are doing very simple jobs like run a query,
insert/update and I see that now you have all QUERY functions as STABLE.
Is this required for new functions from now on?
Is this done in order to improve performance?
----- Original Message -----
From: "Eli Mesika" <emesika(a)redhat.com>
To: "engine-devel" <engine-devel(a)ovirt.org>
Sent: Monday, August 26, 2013 11:22:20 AM
Subject: [Engine-devel] Opimizing Postgres Stored Procedures
I had merged the following patch
This patch introduce usage of the IMMUTABLE, STABLE and STRICT keywords in
order to boost performance of the Postgres SPs.
Please make sure that your current/and future DB scripts applied that.
* A function should be marked as IMMUTABLE if it doesn't change the database,
and if it doesn't perform any lookups (even for database configuration
values) during its operation.
* A function should be marked STABLE if it doesn't change the database, but
might perform lookups (IMMUTABLE is preferable if function meets the
* A function doesn't need to be marked VOLATILE, because that's the default.
A function should be marked STRICT if it should return NULL when it is passed
a NULL argument, and then the function won't even be called if it is indeed
passed a NULL argument.
I am available for any questions.
Engine-devel mailing list