Bug 1270584

Summary: engine database has some missing indexes
Product: [oVirt] ovirt-engine Reporter: Eli Mesika <emesika>
Component: Backend.CoreAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: bugs, masayag, oourfali
Target Milestone: ovirt-3.6.1Keywords: CodeChange, Improvement
Target Release: 3.6.1Flags: ylavi: ovirt-3.6.z?
rule-engine: planning_ack?
oourfali: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 11:06:18 UTC 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:

Description Eli Mesika 2015-10-11 13:05:28 UTC
Description of problem:

PostgreSQL automatically creates indexes on primary keys and unique
constraints, but not on the referencing side of foreign key
relationships.

Since a DELETE of a row from the referenced table or an UPDATE of a
referenced column will require a scan of the referencing table for rows
matching the old value, it is often a good idea to index the referencing
columns.

Since oVirt mainly use the database for read operations, this may boost database performance

Comment 1 Red Hat Bugzilla Rules Engine 2015-10-19 10:56:58 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Yaniv Lavi 2015-10-29 12:39:45 UTC
In oVirt testing is done on single release by default. Therefore I'm removing the 4.0 flag. If you think this bug must be tested in 4.0 as well, please re-add the flag. Please note we might not have testing resources to handle the 4.0 clone.

Comment 3 Lukas Svaty 2016-01-21 15:09:23 UTC
DB logs since previous versions does not contain any related issues. Performance of database queries did not decrease. Putting this bug to verified as sanity should be sufficient for this Code Change. Tested on rhevm-3.6.2.6-0.1.el6.noarch