From: Dan Scott Date: Thu, 3 May 2012 20:44:14 +0000 (-0400) Subject: Add indexes to 2.1.2 upgrade script to speed up acq search X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=22cda7715ef64e3d7ef87f687709cc3c235d2d54;p=evergreen%2Fpines.git Add indexes to 2.1.2 upgrade script to speed up acq search Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql index 6c891d69fe..5fdfd80b73 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql @@ -140,3 +140,15 @@ SELECT metabib.reingest_metabib_field_entries(source) AND char_length(value) > 9 ; +-- Add indexes to speed up acquisitions search +INSERT INTO config.upgrade_log (version) VALUES ('0691'); + +CREATE INDEX poi_po_idx ON acq.po_item (purchase_order); + +CREATE INDEX ie_inv_idx on acq.invoice_entry (invoice); +CREATE INDEX ie_po_idx on acq.invoice_entry (purchase_order); +CREATE INDEX ie_li_idx on acq.invoice_entry (lineitem); + +CREATE INDEX ii_inv_idx on acq.invoice_item (invoice); +CREATE INDEX ii_po_idx on acq.invoice_item (purchase_order); +CREATE INDEX ii_poi_idx on acq.invoice_item (po_item);