Improve the performance of looking up a users circ history by adding
an index on action.usr_circ_history( usr ).
To test for performance improvements time doing a search for a particular
users history before and after the index is created.
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED
);
+CREATE INDEX action_usr_circ_history_usr_idx ON action.usr_circ_history ( usr );
+
CREATE TRIGGER action_usr_circ_history_target_copy_trig
AFTER INSERT OR UPDATE ON action.usr_circ_history
FOR EACH ROW EXECUTE PROCEDURE evergreen.fake_fkey_tgr('target_copy');
--- /dev/null
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version);
+
+CREATE INDEX action_usr_circ_history_usr_idx ON action.usr_circ_history ( usr );
+
+COMMIT;