index which /greatly/ speeds collection of pending active events
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jul 2010 15:36:52 +0000 (15:36 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jul 2010 15:36:52 +0000 (15:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16995 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
Open-ILS/src/sql/Pg/upgrade/0347.schema.action_trigger_evt_idx.sql [new file with mode: 0644]

index 50d3c9c..480a9e0 100644 (file)
@@ -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 ('0346'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0347'); -- miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 481cec0..525ef8b 100644 (file)
@@ -225,6 +225,7 @@ CREATE TABLE action_trigger.event (
     error_output    BIGINT      REFERENCES action_trigger.event_output (id),
     async_output    BIGINT      REFERENCES action_trigger.event_output (id)
 );
+CREATE INDEX atev_target_def_idx ON action_trigger.event (target,event_def);
 
 CREATE TABLE action_trigger.event_params (
     id          BIGSERIAL   PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0347.schema.action_trigger_evt_idx.sql b/Open-ILS/src/sql/Pg/upgrade/0347.schema.action_trigger_evt_idx.sql
new file mode 100644 (file)
index 0000000..07a1615
--- /dev/null
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0347');
+
+CREATE INDEX atev_target_def_idx ON action_trigger.event (target,event_def);
+
+COMMIT;
+