cache OPAC-visibility of copies and bibs
Create a new "materialized view" table, asset.opac_visible_copies,
for use during the copy visibility check during OPAC searches. This
is used by search.query_parser_fts(), replacing a check of a five-table
join for each bib in the search results that proved to be far
too slow on some large databases.
This table is maintained by triggers on inserts and updates to the
following tables:
actor.org_unit
biblio.record_entry
config.copy_status
asset.call_number
asset.copy
asset.copy_location
serial.unit
During a migration or large global change operation, it is recommended
that those triggers be disabled. To (re)populate the materialized
view, do
SELECT asset.refresh_opac_visible_copies_mat_view();
Thanks to Mike Ryladner for his help with this.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16909
dcc99617-32d9-48b4-a31d-
7c20da2025e4