From: scottmk Date: Wed, 22 Sep 2010 15:59:06 +0000 (+0000) Subject: For action.circulation and action.aged_circulation: add indexes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=85373dad48282697c245d9c1698334da4166c2de;p=evergreen%2Fmasslnc.git For action.circulation and action.aged_circulation: add indexes on the target_copy column. This change was made in upgrade script # 0017, but was apparently never applied to the base install script. M Open-ILS/src/sql/Pg/090.schema.action.sql git-svn-id: svn://svn.open-ils.org/ILS/trunk@17889 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index be8c36860c..49db69621a 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -146,6 +146,7 @@ CREATE INDEX circ_open_date_idx ON "action".circulation (xact_start) WHERE xact_ CREATE INDEX circ_all_usr_idx ON action.circulation ( usr ); CREATE INDEX circ_circ_staff_idx ON action.circulation ( circ_staff ); CREATE INDEX circ_checkin_staff_idx ON action.circulation ( checkin_staff ); +CREATE INDEX action_circulation_target_copy_idx ON action.circulation (target_copy); CREATE UNIQUE INDEX circ_parent_idx ON action.circulation ( parent_circ ) WHERE parent_circ IS NOT NULL; CREATE UNIQUE INDEX only_one_concurrent_checkout_per_copy ON action.circulation(target_copy) WHERE checkin_time IS NULL; @@ -185,6 +186,7 @@ CREATE INDEX aged_circ_start_idx ON "action".aged_circulation (xact_start); CREATE INDEX aged_circ_copy_circ_lib_idx ON "action".aged_circulation (copy_circ_lib); CREATE INDEX aged_circ_copy_owning_lib_idx ON "action".aged_circulation (copy_owning_lib); CREATE INDEX aged_circ_copy_location_idx ON "action".aged_circulation (copy_location); +CREATE INDEX action_aged_circulation_target_copy_idx ON action.aged_circulation (target_copy); CREATE OR REPLACE VIEW action.all_circulation AS SELECT id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location,