[open-ils-commits] [GIT] Evergreen ILS branch master updated. 768680b93d84f85ada96c07593a1b9f315ec8099
Evergreen Git
git at git.evergreen-ils.org
Thu Aug 6 11:45:02 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 768680b93d84f85ada96c07593a1b9f315ec8099 (commit)
via 57d756fb33f225233fa73d3dffc6f1d32b4b31d1 (commit)
via 679578d86ecb56885e956ad07a864b2c96808295 (commit)
from b8422397ff57cb4f2709db75451db8a97eb19575 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 768680b93d84f85ada96c07593a1b9f315ec8099
Author: Jason Stephenson <jstephenson at mvlc.org>
Date: Thu Aug 6 11:42:39 2015 -0400
LP#1479953: Stamping Upgrade Script
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index d08026e..829b231 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0921', :eg_version); -- dyrcona/dbwells/remingtron/kmlussier/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0922', :eg_version); -- jeffdavis/kmlussier/dyrcona
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql b/Open-ILS/src/sql/Pg/upgrade/0922.index.queued_record.sql
similarity index 89%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql
rename to Open-ILS/src/sql/Pg/upgrade/0922.index.queued_record.sql
index a1fb2c2..d727b0a 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0922.index.queued_record.sql
@@ -5,7 +5,7 @@ BEGIN;
* speeding up vandelay.bib_queue deletions).
*/
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0922', :eg_version);
CREATE INDEX acq_lineitem_history_queued_record_idx ON acq.acq_lineitem_history (queued_record);
CREATE INDEX li_queued_record_idx ON acq.lineitem (queued_record);
commit 57d756fb33f225233fa73d3dffc6f1d32b4b31d1
Author: Jason Stephenson <jstephenson at mvlc.org>
Date: Thu Aug 6 11:13:00 2015 -0400
LP#1479953: Rename indexes to *_idx and add pgTAP test.
To make the new index names more consistent with existing indices,
I took the liberty of adding _idx to the new index names.
We also add a pgTAP test to verify that the new indices exist in
the database. The test would fail before running the upgrade
script and succeed after.
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/sql/Pg/012.schema.vandelay.sql b/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
index 25e1a6d..27eb528 100644
--- a/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
+++ b/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
@@ -150,7 +150,7 @@ CREATE TABLE vandelay.bib_match (
quality INT NOT NULL DEFAULT 1,
match_score INT NOT NULL DEFAULT 0
);
-CREATE INDEX bib_match_queued_record ON vandelay.bib_match (queued_record);
+CREATE INDEX bib_match_queued_record_idx ON vandelay.bib_match (queued_record);
CREATE TABLE vandelay.import_item (
id BIGSERIAL PRIMARY KEY,
@@ -181,7 +181,7 @@ CREATE TABLE vandelay.import_item (
opac_visible BOOL,
internal_id BIGINT -- queue_type == 'acq' ? acq.lineitem_detail.id : asset.copy.id
);
-CREATE INDEX import_item_record ON vandelay.import_item (record);
+CREATE INDEX import_item_record_idx ON vandelay.import_item (record);
CREATE TABLE vandelay.import_bib_trash_group(
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql
index 9c9f9e5..2741ebc 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -489,7 +489,7 @@ CREATE INDEX li_pl_idx ON acq.lineitem (picklist);
CREATE INDEX li_creator_idx ON acq.lineitem ( creator );
CREATE INDEX li_editor_idx ON acq.lineitem ( editor );
CREATE INDEX li_selector_idx ON acq.lineitem ( selector );
-CREATE INDEX li_queued_record ON acq.lineitem ( queued_record );
+CREATE INDEX li_queued_record_idx ON acq.lineitem ( queued_record );
CREATE TABLE acq.lineitem_alert_text (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql b/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql
index 383e29f..c9d17b6 100644
--- a/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql
+++ b/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql
@@ -103,6 +103,6 @@ CREATE INDEX acq_po_hist_id_idx ON acq.acq_purchase_order_history( id
SELECT acq.create_acq_auditor ( 'acq', 'lineitem' );
CREATE INDEX acq_lineitem_hist_id_idx ON acq.acq_lineitem_history( id );
-CREATE INDEX acq_lineitem_history_queued_record ON acq.acq_lineitem_history (queued_record);
+CREATE INDEX acq_lineitem_history_queued_record_idx ON acq.acq_lineitem_history (queued_record);
COMMIT;
diff --git a/Open-ILS/src/sql/Pg/t/regress/lp1479953_has_indexes.pg b/Open-ILS/src/sql/Pg/t/regress/lp1479953_has_indexes.pg
new file mode 100644
index 0000000..0921d61
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/t/regress/lp1479953_has_indexes.pg
@@ -0,0 +1,10 @@
+BEGIN;
+
+SELECT plan(4);
+
+SELECT has_index('acq', 'acq_lineitem_history', 'acq_lineitem_history_queued_record_idx', ARRAY['queued_record']);
+SELECT has_index('acq', 'lineitem', 'li_queued_record_idx', ARRAY['queued_record']);
+SELECT has_index('vandelay', 'bib_match', 'bib_match_queued_record_idx', ARRAY['queued_record']);
+SELECT has_index('vandelay', 'import_item', 'import_item_record_idx', ARRAY['record']);
+
+ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql
index 4ca13c7..a1fb2c2 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql
@@ -7,9 +7,9 @@ BEGIN;
SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-CREATE INDEX acq_lineitem_history_queued_record ON acq.acq_lineitem_history (queued_record);
-CREATE INDEX li_queued_record ON acq.lineitem (queued_record);
-CREATE INDEX bib_match_queued_record ON vandelay.bib_match (queued_record);
-CREATE INDEX import_item_record ON vandelay.import_item (record);
+CREATE INDEX acq_lineitem_history_queued_record_idx ON acq.acq_lineitem_history (queued_record);
+CREATE INDEX li_queued_record_idx ON acq.lineitem (queued_record);
+CREATE INDEX bib_match_queued_record_idx ON vandelay.bib_match (queued_record);
+CREATE INDEX import_item_record_idx ON vandelay.import_item (record);
COMMIT;
commit 679578d86ecb56885e956ad07a864b2c96808295
Author: Jeff Davis <jdavis at sitka.bclibraries.ca>
Date: Thu Jul 30 13:12:35 2015 -0700
LP#1479953: Add indexes to vqbr foreign key references
Deleting a bib queue can be quite slow if it contains many queued
records. This is because each queued record needs to be deleted, and
this in turn affects many tables that contain unindexed foreign key
references to vandelay.queued_bib_record. Indexing those foreign keys
can speed up bib queue deletion substantially.
Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/sql/Pg/012.schema.vandelay.sql b/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
index b86eda1..25e1a6d 100644
--- a/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
+++ b/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
@@ -150,6 +150,7 @@ CREATE TABLE vandelay.bib_match (
quality INT NOT NULL DEFAULT 1,
match_score INT NOT NULL DEFAULT 0
);
+CREATE INDEX bib_match_queued_record ON vandelay.bib_match (queued_record);
CREATE TABLE vandelay.import_item (
id BIGSERIAL PRIMARY KEY,
@@ -180,6 +181,7 @@ CREATE TABLE vandelay.import_item (
opac_visible BOOL,
internal_id BIGINT -- queue_type == 'acq' ? acq.lineitem_detail.id : asset.copy.id
);
+CREATE INDEX import_item_record ON vandelay.import_item (record);
CREATE TABLE vandelay.import_bib_trash_group(
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql
index 91204a4..9c9f9e5 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -489,6 +489,7 @@ CREATE INDEX li_pl_idx ON acq.lineitem (picklist);
CREATE INDEX li_creator_idx ON acq.lineitem ( creator );
CREATE INDEX li_editor_idx ON acq.lineitem ( editor );
CREATE INDEX li_selector_idx ON acq.lineitem ( selector );
+CREATE INDEX li_queued_record ON acq.lineitem ( queued_record );
CREATE TABLE acq.lineitem_alert_text (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql b/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql
index 51f3507..383e29f 100644
--- a/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql
+++ b/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql
@@ -103,5 +103,6 @@ CREATE INDEX acq_po_hist_id_idx ON acq.acq_purchase_order_history( id
SELECT acq.create_acq_auditor ( 'acq', 'lineitem' );
CREATE INDEX acq_lineitem_hist_id_idx ON acq.acq_lineitem_history( id );
+CREATE INDEX acq_lineitem_history_queued_record ON acq.acq_lineitem_history (queued_record);
COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql
new file mode 100644
index 0000000..4ca13c7
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.index.queued_record.sql
@@ -0,0 +1,15 @@
+BEGIN;
+
+/* LP#1479953: Adding indexes to foreign key references to
+ * vandelay.queued_bib_record will speed up deletions of vqbr records (thereby
+ * speeding up vandelay.bib_queue deletions).
+ */
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE INDEX acq_lineitem_history_queued_record ON acq.acq_lineitem_history (queued_record);
+CREATE INDEX li_queued_record ON acq.lineitem (queued_record);
+CREATE INDEX bib_match_queued_record ON vandelay.bib_match (queued_record);
+CREATE INDEX import_item_record ON vandelay.import_item (record);
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/012.schema.vandelay.sql | 2 ++
Open-ILS/src/sql/Pg/200.schema.acq.sql | 1 +
Open-ILS/src/sql/Pg/201.acq.audit-functions.sql | 1 +
.../src/sql/Pg/t/regress/lp1479953_has_indexes.pg | 10 ++++++++++
.../sql/Pg/upgrade/0922.index.queued_record.sql | 15 +++++++++++++++
6 files changed, 30 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/t/regress/lp1479953_has_indexes.pg
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0922.index.queued_record.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list