Change in ovirt-engine[master]: database: memory_and_disk_images_storage_domain_view

amureini at redhat.com amureini at redhat.com
Fri Aug 12 14:35:46 UTC 2016


Allon Mureinik 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
Related-To: https://bugzilla.redhat.com/1363823
Related-To: https://bugzilla.redhat.com/1302752
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M packaging/dbscripts/create_views.sql
A packaging/dbscripts/upgrade/04_01_0220_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
  Allon Mureinik: Verified; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/62044
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbedd49da10fa6752234eacf72bbb0f350b3c778
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Eldad Marciano <emarcian at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list