From 410b1359b4a56cd4bb21004c98f28ebe5b6d0354 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 9 Sep 2010 15:55:50 +0000 Subject: [PATCH] should have had this index all along, but was less important until now where copy nnotes are used up front git-svn-id: svn://svn.open-ils.org/ILS/trunk@17543 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/040.schema.asset.sql | 1 + Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 8ef60d8a07..ed2136467e 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -68,7 +68,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0390'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0391'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/040.schema.asset.sql b/Open-ILS/src/sql/Pg/040.schema.asset.sql index a3fb73dd4c..1c52cb04bc 100644 --- a/Open-ILS/src/sql/Pg/040.schema.asset.sql +++ b/Open-ILS/src/sql/Pg/040.schema.asset.sql @@ -160,6 +160,7 @@ CREATE TABLE asset.copy_note ( value TEXT NOT NULL ); CREATE INDEX asset_copy_note_creator_idx ON asset.copy_note ( creator ); +CREATE INDEX asset_copy_note_owning_copy_idx ON asset.copy_note ( owning_copy ); CREATE TABLE asset.uri ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql b/Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql new file mode 100644 index 0000000000..32af942ac2 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql @@ -0,0 +1,7 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0391'); -- miker +CREATE INDEX asset_copy_note_owning_copy_idx ON asset.copy_note ( owning_copy ); + +COMMIT; + -- 2.11.0