Bug 905383

Summary: Database functions not fully optimized
Product: Red Hat Enterprise Virtualization Manager Reporter: Lior Vernia <lvernia>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, amureini, bazulay, emesika, iheim, jkt, lpeer, mkalinin, pstehlik, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 995084, 1007564, 1026394    

Description Lior Vernia 2013-01-29 09:57:33 UTC
Description of problem:

PostgreSQL enables marking the volatility and strictness of a function, which in turn might improve the running time of queries. We currently do not take advantage of this, and it might be worthwhile to mark functions this way.

Note on compatibility: while this is specific to PostgreSQL, it should be easy to write a script that drops all occurrences of IMMUTABLE, STABLE etc. if we ever move to another database implementation.


Additional info:

Volatility
----------
* 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 requirements).
* A function doesn't need to be marked VOLATILE, because that's the default.

STRICTNESS
----------
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.

Comment 4 Eli Mesika 2013-08-26 09:42:57 UTC
fixed in commit : df5cf3a

Comment 5 rhev-integ 2013-09-12 18:41:11 UTC
This bug has been cloned to bug #1007564

Comment 7 Itamar Heim 2014-01-21 22:29:02 UTC
Closing - RHEV 3.3 Released

Comment 8 Itamar Heim 2014-01-21 22:29:02 UTC
Closing - RHEV 3.3 Released

Comment 9 Itamar Heim 2014-01-21 22:32:01 UTC
Closing - RHEV 3.3 Released