Bug 823328

Summary: query with query_format='advanced' column_list=['bug_id'] much much slower after upgrade to bugzilla 4
Product: [Fedora] Fedora Reporter: Cole Robinson <crobinso>
Component: python-bugzillaAssignee: Will Woods <wwoods>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: crobinso, dcantrell, jskarvad, rmj, sgreen, wwoods
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-27 22:23:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cole Robinson 2012-05-20 23:18:01 UTC
Previously when doing bugzilla queries we could pass a minimal column_list parameter which was a big speed boost.

Using the python-bugzilla library, I was previously doing

        bzapi.query({
            # 'query_format' only needed with rhbugzilla4
            'query_format': 'advanced',
            'emailtype1': 'substring',
            'emailassigned_to1': True,
            'email1': me,
            'column_list': ['bug_id'],
        })

Would complete in 3-5 seconds. Now it's taking over a minute.

Here's a comment from /usr/bin/bugzilla about why it's a useful optimization, if it's any help:

        #to optimize speed and reduce network traffic through lookups, we
        #specifically tell bugzilla the exact data we want.  This allows us
        #make one call to output the data, rather than have a follow-on
        #getbug() to grab more info than what the default has.
        #Testing has shown this to be a _huge_ time saver.  Unfortunately,
        #this list and the output format have to be in _sync_.  Otherwise,
        #you lose speed by doing a look-up for each new output element.

Comment 1 Simon Green 2012-05-20 23:31:07 UTC
From https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#search

In addition to the parameters below, this method also accepts the standard include_fields, exclude_fields and extra_fields arguments

so if you specified

include_fields => ['id']

You would get just the bug id. (the field is known as 'id' in Bug.search / Bug.get now.

  -- simon

Comment 2 Cole Robinson 2012-05-21 12:42:34 UTC
Okay, if column_list isn't effective anymore, python-bugzilla probably needs to be changed, so reassigning.

Comment 3 Cole Robinson 2012-12-27 22:23:45 UTC
This has been fixed for awhile