hold count by record includes useless where clause
Bug #1201962 reported by
Mike Rylander
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.3 |
Invalid
|
Medium
|
Unassigned | ||
2.4 |
Fix Released
|
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.
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.