From: Galen Charlton Date: Fri, 29 Jul 2016 15:24:07 +0000 (-0400) Subject: LP#1588543: further speed up record attribute ingest X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6cc1d1e0911f4dd4a92d17a9b60025888b080bff;p=Evergreen.git LP#1588543: further speed up record attribute ingest Following a suggestion from Dan Wells, this patch adds an index on config.coded_value_map(ctype). My testing shows that the index by itself can halve the time required to fully ingest a new record; in conjunction with the change in the previous patch, full reingest time is reduced by about 60%. Signed-off-by: Galen Charlton Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 0a00b31189..4e37f2c4a3 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -821,6 +821,8 @@ CREATE TABLE config.coded_value_map ( -- coded value represents ); +CREATE INDEX config_coded_value_map_ctype_idx ON config.coded_value_map (ctype); + CREATE VIEW config.language_map AS SELECT code, value FROM config.coded_value_map WHERE ctype = 'item_lang'; CREATE VIEW config.bib_level_map AS SELECT code, value FROM config.coded_value_map WHERE ctype = 'bib_level'; CREATE VIEW config.item_form_map AS SELECT code, value FROM config.coded_value_map WHERE ctype = 'item_form';