Tal Nisan has uploaded a new change for review.

Change subject: core: Remove redundant JOIN statement in a storage procedure
......................................................................

core: Remove redundant JOIN statement in a storage procedure

Removed JOIN in fn_get_actual_images_size_by_storage, the join with between
images_storage_domain_view and disk_image_dynamic since the field
actual_size used in the statement already exists in
images_storage_domain_view

Change-Id: I4f7096ef43876f3b2b96f61a60620e0e33a4e6db
Signed-off-by: Tal Nisan <[email protected]>
---
M packaging/dbscripts/create_functions.sql
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/10/33010/1

diff --git a/packaging/dbscripts/create_functions.sql 
b/packaging/dbscripts/create_functions.sql
index ab2a60d..ac822f2 100644
--- a/packaging/dbscripts/create_functions.sql
+++ b/packaging/dbscripts/create_functions.sql
@@ -446,9 +446,8 @@
 
 BEGIN
        mult := ( SELECT
-                       COALESCE(SUM(disk_image_dynamic.actual_size),0)
-                               FROM images_storage_domain_view JOIN
-                               disk_image_dynamic ON ( 
images_storage_domain_view.image_guid = disk_image_dynamic.image_id )
+                       COALESCE(SUM(images_storage_domain_view.actual_size),0)
+                               FROM images_storage_domain_view
                                WHERE images_storage_domain_view.storage_id = 
v_storage_domain_id );
         -- convert to GB from bytes
        mult := CAST((mult * 0.000000000931322574615478515625) AS bigint);


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

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

Reply via email to