Bug 1241767 - get_enterable_products query is inefficient against large PG databases
Summary: get_enterable_products query is inefficient against large PG databases
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Performance
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Matt Tyson 🤬
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-10 04:50 UTC by Will Thames
Modified: 2025-10-16 23:41 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
4.4.9035 against postgresql
Last Closed: 2015-09-20 23:29:30 UTC
Embargoed:


Attachments (Terms of Use)
explain analyze of query and improved implementation (10.47 KB, text/plain)
2015-07-10 04:50 UTC, Will Thames
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1183492 0 None None None Never

Description Will Thames 2015-07-10 04:50:56 UTC
Created attachment 1050513 [details]
explain analyze of query and improved implementation

Description of problem:

the query used in get_enterable_products to generate a list of products with an active component and active version is inefficient in large Postgresql databases

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

See attached file for explain results on postgresql

Comment 1 Matt Tyson 🤬 2015-07-14 03:23:34 UTC
Using the query provided by Will, execution time is reduced from 55ms to 2ms on my test setup.

Comment 2 Rony Gong 🔥 2015-07-21 05:42:00 UTC
Tested on 
QA environment(bzweb01-qe) with version(4.4.9037-5, DB: mysql)
QA environment(bzperfweb01.app.qa) with version(4.4.9037-5, DB: psql )
Result: Pass
QE Will use regression test to cover this.

Comment 3 Matt Tyson 🤬 2015-09-20 23:29:30 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.


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