[icinga-checkins] icinga.org: icinga2/master: DB IDO: Add missing object_id index for icinga_{scheduleddowntime, comments} tables

git at icinga.org git at icinga.org
Mon Jun 20 16:25:13 CEST 2016


Module: icinga2
Branch: master
Commit: a86e381134ba4aee5f10493a52780727b374e7b4
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=a86e381134ba4aee5f10493a52780727b374e7b4

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Mon Jun 20 16:23:57 2016 +0200

DB IDO: Add missing object_id index for icinga_{scheduleddowntime,comments} tables

fixes #10070
refs #11947

---

 lib/db_ido_mysql/schema/mysql.sql         |    4 ++++
 lib/db_ido_mysql/schema/upgrade/2.5.0.sql |    7 +++++++
 lib/db_ido_pgsql/schema/pgsql.sql         |    4 ++++
 lib/db_ido_pgsql/schema/upgrade/2.5.0.sql |    7 +++++++
 4 files changed, 22 insertions(+)

diff --git a/lib/db_ido_mysql/schema/mysql.sql b/lib/db_ido_mysql/schema/mysql.sql
index b6e9b78..8e5bdd3 100644
--- a/lib/db_ido_mysql/schema/mysql.sql
+++ b/lib/db_ido_mysql/schema/mysql.sql
@@ -1645,6 +1645,10 @@ CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, co
 CREATE INDEX cv_session_del_idx ON icinga_customvariables (session_token);
 CREATE INDEX cvs_session_del_idx ON icinga_customvariablestatus (session_token);
 
+-- #10070
+CREATE INDEX comments_object_id_idx on icinga_comments(object_id);
+CREATE INDEX scheduleddowntime_object_id_idx on icinga_scheduleddowntime(object_id);
+
 -- -----------------------------------------
 -- set dbversion
 -- -----------------------------------------
diff --git a/lib/db_ido_mysql/schema/upgrade/2.5.0.sql b/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
index b693cf3..25d3949 100644
--- a/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
+++ b/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
@@ -15,6 +15,13 @@ ALTER TABLE icinga_hoststatus MODIFY COLUMN check_source varchar(255) character
 ALTER TABLE icinga_servicestatus MODIFY COLUMN check_source varchar(255) character set latin1  default '';
 
 -- -----------------------------------------
+-- #10070
+-- -----------------------------------------
+
+CREATE INDEX comments_object_id_idx on icinga_comments(object_id);
+CREATE INDEX scheduleddowntime_object_id_idx on icinga_scheduleddowntime(object_id);
+
+-- -----------------------------------------
 -- set dbversion
 -- -----------------------------------------
 INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.14.1', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.14.1', modify_time=NOW();
diff --git a/lib/db_ido_pgsql/schema/pgsql.sql b/lib/db_ido_pgsql/schema/pgsql.sql
index 64c50b5..90e787a 100644
--- a/lib/db_ido_pgsql/schema/pgsql.sql
+++ b/lib/db_ido_pgsql/schema/pgsql.sql
@@ -1674,6 +1674,10 @@ CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, co
 CREATE INDEX cv_session_del_idx ON icinga_customvariables (session_token);
 CREATE INDEX cvs_session_del_idx ON icinga_customvariablestatus (session_token);
 
+-- #10070
+CREATE INDEX comments_object_id_idx on icinga_comments(object_id);
+CREATE INDEX scheduleddowntime_object_id_idx on icinga_scheduleddowntime(object_id);
+
 -- -----------------------------------------
 -- set dbversion
 -- -----------------------------------------
diff --git a/lib/db_ido_pgsql/schema/upgrade/2.5.0.sql b/lib/db_ido_pgsql/schema/upgrade/2.5.0.sql
index c851f71..e52c4ef 100644
--- a/lib/db_ido_pgsql/schema/upgrade/2.5.0.sql
+++ b/lib/db_ido_pgsql/schema/upgrade/2.5.0.sql
@@ -16,6 +16,13 @@ ALTER TABLE icinga_servicestatus ALTER COLUMN check_source TYPE varchar(255);
 ALTER TABLE icinga_statehistory ALTER COLUMN check_source TYPE varchar(255);
 
 -- -----------------------------------------
+-- #10070
+-- -----------------------------------------
+
+CREATE INDEX comments_object_id_idx on icinga_comments(object_id);
+CREATE INDEX scheduleddowntime_object_id_idx on icinga_scheduleddowntime(object_id);
+
+-- -----------------------------------------
 -- set dbversion
 -- -----------------------------------------
 



More information about the icinga-checkins mailing list