Calculate proximity in the DB for speed
authorMike Rylander <mrylander@gmail.com>
Sun, 2 Mar 2014 21:29:27 +0000 (16:29 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
commite3ffa09ce7f5c1fe505d932b861d4de78439fea1
tree9c4d15f4f454a0b4d408d2dde0c9b417f8dd9ce9
parent9657f893644414060631c76938fa1907642283ce
Calculate proximity in the DB for speed

We need to calculate and store a (potenially adjusted) proxmity for
each hold and copy for use in targetting and optimization of op
capture.  Before this commit, we do that within the hold target
code itself.  Now we'll do it when the hold-copy map is inserted,
because we have the same information available at that time as we
have in the targeter.  This will both speed up the apparent cost of
the calculation, because it avoids the cost of a network round-trip,
and the total number of SELECTs we must issue, because the proximity
value will now be cached for use by the proximity map function.

Backward compatability is retained for the create_prox_map() function
in case any other code is depending on that.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.pre-calculate-prox-adjustment.sql [new file with mode: 0644]