hold count by record includes useless where clause

Bug #1201962 reported by Mike Rylander on 2013-07-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Medium
Unassigned
2.3
Medium
Unassigned
2.4
Medium
Unassigned

Bug Description

When rendering results in the tpac we request hold counts for each record. Most of the time (that is, whenever org unit hiding is /not/ in use) we filter, essentially, on "where pickup_lib is in the org tree". This is both useless and slow, so this commit will recognize that and optimize the test away.

The end result is a (sometimes) multi-second query one a mid-sized data set becomes a millisecond query.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/miker/faster-hold-count-per-record

I have tested this and signed off on a version with a trivial typo fix. It works as advertised for master and rel_2_4.

I don't believe this actually applies to rel_2_3. The code that has the filter you're optimizing away didn't come in until rel_2_4, with TPAC org-unit hiding.

Merged to master and rel_2_4.

Changed in evergreen:
status: New → Fix Committed
Ben Shum (bshum) on 2013-11-11
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers