Piotr Kliczewski has submitted this change and it was merged.
Change subject: database: memory_and_disk_images_storage_domain_view
......................................................................
database: memory_and_disk_images_storage_domain_view
Inline EXISTS conditions in a select list, should, in theory perform a
query once per row of the select list, while moving the same logic to a
LEFT JOIN should allow the database to perform the query just once and
hash-join it, resulting in a performance improvement.
This patch also adds the missing indexes on the snapshots table to make
these joins efficient.
According to the work done on verifying bug #1302752, on a loaded system
with 500 hosts, 7K VMs and 3 disks per VM, this patch improves the
query's runtime by a factor of 33 - from 6600 msecs to 200 msecs.
Change-Id: Ifbedd49da10fa6752234eacf72bbb0f350b3c778
Bug-Url:
https://bugzilla.redhat.com/1363823
Bug-Url:
https://bugzilla.redhat.com/1302752
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M packaging/dbscripts/create_views.sql
A
packaging/dbscripts/upgrade/04_00_0860_memory_and_disk_images_storage_domain_view_join_indexes.sql
2 files changed, 13 insertions(+), 17 deletions(-)
Approvals:
Martin Peřina: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit
https://gerrit.ovirt.org/62286
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbedd49da10fa6752234eacf72bbb0f350b3c778
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>