This index is needed so that full table scans on ash aren't
needed during authority record reingest.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
CREATE INDEX authority_simple_heading_index_vector_idx ON authority.simple_heading USING GIST (index_vector);
CREATE INDEX authority_simple_heading_value_idx ON authority.simple_heading (value);
CREATE INDEX authority_simple_heading_sort_value_idx ON authority.simple_heading (sort_value);
+CREATE INDEX authority_simple_heading_record_idx ON authority.simple_heading (record);
CREATE OR REPLACE FUNCTION authority.simple_heading_set( marcxml TEXT ) RETURNS SETOF authority.simple_heading AS $func$
DECLARE
--- /dev/null
+-- index authority.simple_heading.record so that reingesting
+-- authority records does not require a sequential scan of ash
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE INDEX authority_simple_heading_record_idx ON authority.simple_heading (record);
+
+COMMIT;