Bug 984962 - SearchQuery generates slow query on vds_with_tags
SearchQuery generates slow query on vds_with_tags
Status: CLOSED DUPLICATE of bug 984973
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.4.0
Assigned To: Liran Zelkha
infra
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-16 09:39 EDT by Liran Zelkha
Modified: 2016-02-10 14:19 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-05 08:20:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Liran Zelkha 2013-07-16 09:39:51 EDT
Description of problem:
When AutoRecoveryManager runs it generates a query to select all VDS with a specific group name. This query is slow and can be optimized easily.

Version-Release number of selected component (if applicable):


How reproducible:
Run engine.

Steps to Reproduce:
1. Connect with a profiler to engine, and examine queries.
2.
3.

Actual results:
Generated query is:
SELECT * FROM (SELECT * FROM vds WHERE ( vds_id IN (SELECT vds_with_tags.vds_id FROM  vds_with_tags   WHERE  vds_with_tags.vds_group_name LIKE 'Default' ))  ORDER BY vds_name ASC ,vds_name ASC ) as T1 OFFSET (1 -1) LIMIT 2147483647

Expected results:
Should be SELECT * FROM vds WHERE vds_group_name LIKE 'Default' ORDER BY vds_name ASC as T1 OFFSET (1 -1) LIMIT 2147483647

Additional info:
Comment 1 Liran Zelkha 2013-11-05 08:20:44 EST

*** This bug has been marked as a duplicate of bug 984973 ***

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