Last Circulation or Creation Date reporting source could be made faster

Bug #2059813 reported by Galen Charlton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

We saw a weeding report that took three hours to run. Upon examining it, some things that jump out were:

* it uses the IDL view "rlc" (AKA "Last Circulation or Creation Date") to get at the last date that the item was created or circulationed
* "rlc" uses the DB view action.all_circulation to get for the last circ date from action.circulation & action.aged_circulation
* However, "rlc" doesn't need action.all_circulation per se, since it makes no reference to the user, item, or call number. it could use action.all_circulation_slim instead

Empirically, updating "rlc" to used action.all_circulation_slim resulted in a query plan that omits the sequential scan on action.aged_circulation found in the original query as well as joins and sequential scans on actor.usr, actor.usr_address, asset.copy, and action.call_number.

Consequently, updating the definition of "rlc" could provide a significant speed boost for reporter queries that include that reporting source.

Galen Charlton (gmc)
tags: added: performance reports
Galen Charlton (gmc)
description: updated
description: updated
Revision history for this message
Galen Charlton (gmc) wrote :
tags: added: pullrequest
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.