Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057561 - [SCALE] Templates are being pulled from template view in a very inefficient way
Summary: [SCALE] Templates are being pulled from template view in a very inefficient way
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 3.4.0
Assignee: Liran Zelkha
QA Contact: Eldad Marciano
URL:
Whiteboard: infra
Depends On: 1056064
Blocks: GSS_RHEV_33_BETA 1061185 rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2014-01-24 11:16 UTC by Tomas Dosek
Modified: 2018-12-05 17:04 UTC (History)
15 users (show)

Fixed In Version: ovirt-3.4.0-beta2
Doc Type: Bug Fix
Doc Text:
Previously, an inefficient query caused templates pulled from template view to take a long time. This resulted in the query taking longer than expected to display results. Now, an updated query has fixed the problem. As a result, templates are displayed more quickly.
Clone Of: 1056064
: 1061185 (view as bug list)
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0506 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Virtualization Manager 3.4.0 update 2014-06-09 18:55:38 UTC
oVirt gerrit 23811 None None None Never
oVirt gerrit 24050 None None None Never
oVirt gerrit 24095 None None None Never

Comment 1 Tomas Dosek 2014-01-24 11:17:31 UTC
Same as the above from audit log was observed with templates:

[pid 3767 127.0.0.1(39427)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3766 127.0.0.1(39426)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3722 127.0.0.1(39425)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3500 127.0.0.1(39413)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3500 127.0.0.1(39413)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3618 127.0.0.1(39415)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3766 127.0.0.1(39426)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3767 127.0.0.1(39427)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3767 127.0.0.1(39427)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3767 127.0.0.1(39427)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3500 127.0.0.1(39413)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3722 127.0.0.1(39425)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3767 127.0.0.1(39427)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3618 127.0.0.1(39415)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3722 127.0.0.1(39425)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3618 127.0.0.1(39415)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3766 127.0.0.1(39426)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3722 127.0.0.1(39425)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100
[pid 3722 127.0.0.1(39425)]DEBUG:  00000: parse <unnamed>: SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM  vm_templates_storage_domain  ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100

Comment 2 Liran Zelkha 2014-01-25 18:09:47 UTC
Hi Tomas,

This should be exactly the same as - https://bugzilla.redhat.com/show_bug.cgi?id=1029106. Can you confirm this is the same, and that the solution works?

Comment 3 Liran Zelkha 2014-01-25 18:10:05 UTC
Hi Tomas,

This should be exactly the same as - https://bugzilla.redhat.com/show_bug.cgi?id=1029106. Can you confirm this is the same, and that the solution works?

Comment 4 Tomas Dosek 2014-01-25 19:41:17 UTC
Hi Liran,

Unfortunately not. This has been found on environment that was upgraded to 3.3 GA (which afaik included the patch already).

Comment 5 Liran Zelkha 2014-01-26 08:19:41 UTC
Hi Tomas,

Just to make sure - the fix was entered in 3.3.2, and was merged on December 10th. Are you sure your version is newer?

Comment 10 Tareq Alayan 2014-02-17 10:14:45 UTC
what is considered to be OK time  ?
now it takes ~2seconds is it ok?

tested on ovirt-engine-3.4.0-0.7.beta2.el6.noarch

Comment 11 Tareq Alayan 2014-02-17 11:44:09 UTC
functional testing point of view: i see that the audit_log and event_log are viewed ok. 

Gil, do u see apropriate to do scale testing here by Yuri's team? 
Or shall i move it to verify?

Comment 12 Gil Klein 2014-02-17 16:18:44 UTC
Eldad, would you be able to verify this on the scale lab?

Comment 14 Eldad Marciano 2014-05-13 11:26:20 UTC
Not reproduced

Comment 15 Itamar Heim 2014-06-12 14:10:29 UTC
Closing as part of 3.4.0


Note You need to log in before you can comment on or make changes to this bug.