A huge number of rows (700+) have been added to
config.record_attr_definition in recent versions of Evergreen. However,
these rows do not actually define any indexing at all, but are used for
other purposes. The reingest process currently churns over all of these
rows to ultimately do nothing.
This commit limits the group of attributes considered at ingest to only
those which might index something. Testing indicates a substantial
speed boost to typical use of metabib.reingest_record_attributes()
(over 2x speedup).
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
BEGIN
IF attr_list IS NULL OR rdeleted THEN -- need to do the full dance on INSERT or undelete
- SELECT ARRAY_AGG(name) INTO attr_list FROM config.record_attr_definition;
+ SELECT ARRAY_AGG(name) INTO attr_list FROM config.record_attr_definition
+ WHERE (
+ tag IS NOT NULL OR
+ fixed_field IS NOT NULL OR
+ xpath IS NOT NULL OR
+ phys_char_sf IS NOT NULL OR
+ composite
+ ) AND (
+ filter OR sorter
+ );
END IF;
IF rmarc IS NULL THEN