From 6a4d2c551a728cb771ea454120252ba046a07b9c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 29 Jul 2016 11:24:07 -0400 Subject: [PATCH] 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 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 2cc6ff5413..6496af7930 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'; -- 2.11.0