Liron Ar has uploaded a new change for review.

Change subject: core: GetAllFromVmStaticByStoragePoolId - remove unneeded join
......................................................................

core: GetAllFromVmStaticByStoragePoolId - remove unneeded join

remove unneeded join with vm_dynamic, vm_dynamic and vm_static should be
added in the same transacation when adding a vm. I assume that this join
was added to avoid querying templates, but it's unneeded as we already
check the entity type in the query without performing that probably more
expensive operation.

Change-Id: I4fd372a5c4018d3c7bb7e38e1375fa198a14b572
Signed-off-by: Liron Aravot <[email protected]>
---
M packaging/dbscripts/vms_sp.sql
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/24716/1

diff --git a/packaging/dbscripts/vms_sp.sql b/packaging/dbscripts/vms_sp.sql
index 2257595..1a98f8e 100644
--- a/packaging/dbscripts/vms_sp.sql
+++ b/packaging/dbscripts/vms_sp.sql
@@ -711,7 +711,6 @@
 BEGIN
 RETURN QUERY SELECT vm_static.*
    FROM vm_static INNER JOIN
-        vm_dynamic ON vm_static.vm_guid = vm_dynamic.vm_guid INNER JOIN
         vds_groups ON vm_static.vds_group_id = vds_groups.vds_group_id LEFT 
OUTER JOIN
         storage_pool ON vm_static.vds_group_id = vds_groups.vds_group_id
         and vds_groups.storage_pool_id = storage_pool.id


-- 
To view, visit http://gerrit.ovirt.org/24716
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fd372a5c4018d3c7bb7e38e1375fa198a14b572
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to