]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1526858: speed up queries for shelf-expired holds during checkin
authorGalen Charlton <gmc@esilibrary.com>
Wed, 16 Dec 2015 16:03:42 +0000 (11:03 -0500)
committerKathy Lussier <klussier@masslnc.org>
Fri, 10 Jun 2016 15:59:53 +0000 (11:59 -0400)
commit59b8392d2ba3db67bc6928ae7a3f2b6901aefa72
tree07a56d2d5207ad65242b54163860ae9a40f167fa
parent5fdc94e22d4801f1aa4aebd6c4b9b21e7742adda
LP#1526858: speed up queries for shelf-expired holds during checkin

This patch adds indexes on action.hold_request and tweaks
the definition of the alhr IDL view to more efficiently
identify holds that can be canceled if the "Clear Holds Shelf"
checkin modifier is in use.  This can prevent a problem
where such checkins can time out in very large databases.

The tweaks were created by Jason Etheridge and have been in
production at a large consortium for some time.

To test
-------
[1] With a suitably large database, set up an item that
    is on the holds shelf but has passed its shelf-expiration
    time, then check it in using the "Clear Holds Shelf" modifier.
[2] The checkin may fail with a "network failure" message due
    the query on the alhr timing out.
[3] Apply the patch and repeat step 1. This time, the checkin
    should succeed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jeanette Lundgren <jlundgren@cwmars.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/090.schema.action.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql [new file with mode: 0644]