]> git.evergreen-ils.org Git - Evergreen.git/commit
LP1272316 - Calculate proximity in the DB for speed
authorMike Rylander <mrylander@gmail.com>
Fri, 14 Feb 2014 17:01:37 +0000 (12:01 -0500)
committerBen Shum <bshum@biblio.org>
Fri, 28 Feb 2014 17:34:39 +0000 (12:34 -0500)
commitaf966c3f322b4ad9d5a046026f57da5ca5cc995d
tree26201759760b96a6ebeb7731fa76eebfebf0cd3f
parent4cb16a9f07180d4ef99c960834994e32b82d5881
LP1272316 - 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>
Signed-off-by: Ben Shum <bshum@biblio.org>
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]