Liran Zelkha has uploaded a new change for review. Change subject: core: Improve performance of getVmDeviceByVmId ......................................................................
core: Improve performance of getVmDeviceByVmId getVmDeviceByVmId is calling a query on vm_device_view using vm_id as a parameter. Since vm_id does not have an index, this query takes a long time. This patch added an index, which improved performance in the perf environemnt from 56ms to 0.2ms. Change-Id: Icc45e9dd3e4b0cd23d0d28b017b19da13f315d5b Bug-Url: https://bugzilla.redhat.com/1154421 Signed-off-by: lzel...@redhat.com <lzel...@redhat.com> --- A packaging/dbscripts/upgrade/03_05_1100_create_index_on_vm_device.sql 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/77/34377/1 diff --git a/packaging/dbscripts/upgrade/03_05_1100_create_index_on_vm_device.sql b/packaging/dbscripts/upgrade/03_05_1100_create_index_on_vm_device.sql new file mode 100644 index 0000000..e3e399e --- /dev/null +++ b/packaging/dbscripts/upgrade/03_05_1100_create_index_on_vm_device.sql @@ -0,0 +1,3 @@ +-- Create index +CREATE INDEX IDX_vm_device_vm_id on vm_device(vm_id); + -- To view, visit http://gerrit.ovirt.org/34377 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc45e9dd3e4b0cd23d0d28b017b19da13f315d5b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Liran Zelkha <lzel...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches