LP#1374551: Create index on money.billing.voider to speed user merge.
authorChris Sharp <csharp@georgialibraries.org>
Fri, 26 Sep 2014 18:19:22 +0000 (14:19 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 10 Oct 2014 15:34:42 +0000 (11:34 -0400)
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/080.schema.money.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.index.money_billing.voider.sql [new file with mode: 0644]

index 5004f00..fc0cfe3 100644 (file)
@@ -62,6 +62,7 @@ CREATE TABLE money.billing (
 );
 CREATE INDEX m_b_xact_idx ON money.billing (xact);
 CREATE INDEX m_b_time_idx ON money.billing (billing_ts);
+CREATE INDEX m_b_voider_idx ON money.billing (voider); -- helps user merge function speed
 
 CREATE TABLE money.payment (
        id              BIGSERIAL                       PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.index.money_billing.voider.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.index.money_billing.voider.sql
new file mode 100644 (file)
index 0000000..71fd220
--- /dev/null
@@ -0,0 +1,7 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE INDEX m_b_voider_idx ON money.billing (voider);
+
+COMMIT;