diff options
author | Matt Tyson <mtyson@redhat.com> | 2015-07-28 18:28:13 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-07-28 18:28:13 +0200 |
commit | 61a971cd65be2eaaa923af0f17a00159cc0e8222 (patch) | |
tree | b3d825acea12452d1eb182b9bb5b4ed855c97a43 | |
parent | bdc889f4bec1ebc63bdb0442516a48267a910271 (diff) | |
download | bugzilla-61a971cd65be2eaaa923af0f17a00159cc0e8222.tar.gz bugzilla-61a971cd65be2eaaa923af0f17a00159cc0e8222.tar.xz |
Bug 1183492: Optimize the SQL query for get_enterable_products()
r=LpSolit a=sgreen
-rw-r--r-- | Bugzilla/User.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 8df1316c5..d6c1f1225 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1431,10 +1431,10 @@ sub get_enterable_products { WHERE ' . $dbh->sql_in('products.id', $enterable_ids) . ' AND products.id IN (SELECT DISTINCT components.product_id FROM components - WHERE components.isactive = 1) + WHERE components.isactive = 1 AND products.id = components.product_id) AND products.id IN (SELECT DISTINCT versions.product_id FROM versions - WHERE versions.isactive = 1)'); + WHERE versions.isactive = 1 AND products.id = versions.product_id)'); } $self->{enterable_products} = |