Liran Zelkha has uploaded a new change for review. Change subject: core: Improve performance of GetAllSnapshotsByStorageDomainId ......................................................................
core: Improve performance of GetAllSnapshotsByStorageDomainId GetAllSnapshotsByStorageDomainId returns a huge number of duplicate rows. Under load this creates a memory issue. This patch solves this. Change-Id: I87207b3c284c161b0d0dfa72d21fb47593d010b3 Bug-Url: https://bugzilla.redhat.com/1190471 Signed-off-by: lzel...@redhat.com <lzel...@redhat.com> --- M packaging/dbscripts/snapshots_sp.sql 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/45/37645/1 diff --git a/packaging/dbscripts/snapshots_sp.sql b/packaging/dbscripts/snapshots_sp.sql index ebb3ae7..28cd22f 100644 --- a/packaging/dbscripts/snapshots_sp.sql +++ b/packaging/dbscripts/snapshots_sp.sql @@ -144,7 +144,7 @@ SELECT snapshots.* FROM snapshots JOIN images ON snapshots.snapshot_id = images.vm_snapshot_id - JOIN image_storage_domain_map ON image_storage_domain_map.storage_domain_id = v_storage_id; + JOIN image_storage_domain_map ON image_storage_domain_map.storage_domain_id = v_storage_id and image_storage_domain_map.image_id=images.image_guid; END; $procedure$ LANGUAGE plpgsql; -- To view, visit http://gerrit.ovirt.org/37645 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87207b3c284c161b0d0dfa72d21fb47593d010b3 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liran Zelkha <lzel...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches