]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Calculate proximity in the DB for speed collab/miker/prox-calc-speedup_plus_aouas-speedup_rebased
authorMike Rylander <mrylander@gmail.com>
Fri, 14 Feb 2014 17:01:37 +0000 (12:01 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 25 Feb 2014 19:05:10 +0000 (14:05 -0500)
commit45802100104fc2a47d6b27c2047381881b3f78a1
tree39a8aa1bcbb09ce88c52516d52f181ebcc07224d
parent0c36fe5125d26ac415a905512d9e83be1903468a
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
Open-ILS/src/sql/Pg/090.schema.action.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.pre-calculate-prox-adjustment.sql [new file with mode: 0644]