Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
f0e69404
Commit
f0e69404
authored
Feb 28, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 731055: get_enterable_products() is very slow when a product has many components or versions
r/a=mkanat
parent
a526c1f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
User.pm
Bugzilla/User.pm
+8
-6
No files found.
Bugzilla/User.pm
View file @
f0e69404
...
...
@@ -1036,12 +1036,14 @@ sub get_enterable_products {
# And all of these products must have at least one component
# and one version.
$enterable_ids
=
$dbh
->
selectcol_arrayref
(
'SELECT DISTINCT products.id FROM products
INNER JOIN components ON components.product_id = products.id
INNER JOIN versions ON versions.product_id = products.id
WHERE products.id IN ('
.
join
(
','
,
@$enterable_ids
)
.
')
AND components.isactive = 1
AND versions.isactive = 1'
);
'SELECT DISTINCT products.id FROM products
WHERE '
.
$dbh
->
sql_in
(
'products.id'
,
$enterable_ids
)
.
' AND products.id IN (SELECT DISTINCT components.product_id
FROM components
WHERE components.isactive = 1)
AND products.id IN (SELECT DISTINCT versions.product_id
FROM versions
WHERE versions.isactive = 1)'
);
}
$self
->
{
enterable_products
}
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment