Commit 61a971cd authored by Matt Tyson's avatar Matt Tyson Committed by Frédéric Buclin

Bug 1183492: Optimize the SQL query for get_enterable_products()

r=LpSolit a=sgreen
parent bdc889f4
......@@ -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} =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment