LP#1482757: Speed Up the Delete of Orphaned URIs in upgrade script
authorJason Stephenson <jason@sigio.com>
Thu, 24 Sep 2020 16:31:23 +0000 (12:31 -0400)
committerMichele Morgan <mmorgan@noblenet.org>
Fri, 25 Feb 2022 19:56:58 +0000 (14:56 -0500)
commit300acbf91ea60ddd3fc9e76eecb6aac7f64e98fe
tree009d73d3e6d773b716e414a35fccd9d3cae894d8
parent60a20d54c5e690bb927a56f84b86c76d7181ce22
LP#1482757: Speed Up the Delete of Orphaned URIs in upgrade script

Modify the code that deletes orphaned asset.uri table entries in the
upgrade script to use IN logic on the subquery, because IN is much
faster than NOT IN.  Also take into account the link between
serial.item and asset.uri so that we don't accidentally delete URIs
used by serial items.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Jessica Woolford <jwoolford@biblio.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.function.biblio.extract_located_uris.sql