]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1971745 - speed up open-ils.storage.action.live_holds.wide_hash
authorJosh Stompro <stomproj@larl.org>
Tue, 22 Nov 2022 18:09:46 +0000 (12:09 -0600)
committerJason Stephenson <jstephenson@cwmars.org>
Mon, 28 Nov 2022 19:53:26 +0000 (14:53 -0500)
commitf7d44467bbbf5c71dc351a8b38ea033d3b4f0c9b
treefaa766c2936b6a0b208246c0dd28b19bc2eb56ac
parent9e9868e43fb1204d80fc8fdc2e17cb9c08b66077
LP#1971745 - speed up open-ils.storage.action.live_holds.wide_hash

Postgresql 10 and EG 3.9.0

The query to grab holds on the hold shelf was taking 35-50 seconds on
a test system to return 466 records.  Explain analyze showed that the
left join on asset.call_number was causing a sequential scan and reading
all asset.call_number rows.

Letting PG know that the two conditions of the join are mutually exclusive
seems to let PG know that an index scan is faster.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Jason Stephenson <jstephenson@cwmars.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm