[icinga-checkins] icinga.org: icinga-core/r1.2: idoutils: add index to table icinga_statehistory for usage in reporting module #957

git at icinga.org git at icinga.org
Tue Nov 9 08:24:13 CET 2010


Module: icinga-core
Branch: r1.2
Commit: da45f1c0275c1aa3d47a17c2bcbb86be6d526905
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=da45f1c0275c1aa3d47a17c2bcbb86be6d526905

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Nov  4 18:03:11 2010 +0100

idoutils: add index to table icinga_statehistory for usage in reporting module #957

fixes #957

---

 Changelog                                          |    2 ++
 module/idoutils/db/mysql/mysql-upgrade-1.3.0.sql   |   18 ++++++++++++++++++
 module/idoutils/db/mysql/mysql.sql                 |    2 ++
 module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql |   18 ++++++++++++++++++
 module/idoutils/db/oracle/oracle.sql               |    2 ++
 module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql   |   18 ++++++++++++++++++
 module/idoutils/db/pgsql/pgsql.sql                 |    2 ++
 7 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/Changelog b/Changelog
index 3bacc0e..b92eca4 100644
--- a/Changelog
+++ b/Changelog
@@ -8,6 +8,8 @@ ENHANCEMENTS
 * classic ui: add instance hostname to html title #954
 * classic ui: use the signal-colour red more economically in tac.css stylesheet (Joachim Raber) #868
 
+* idoutils: add index to table icinga_statehistory for usage in reporting module #957
+
 FIXES
 * core: base/utils: Refactor my_fcopy() (Andreas Ericsson) #427
 * core: base/nebmods: Replace local file-copy hack with my_fdcopy() (Andreas Ericsson) #424
diff --git a/module/idoutils/db/mysql/mysql-upgrade-1.3.0.sql b/module/idoutils/db/mysql/mysql-upgrade-1.3.0.sql
new file mode 100644
index 0000000..6b5cd59
--- /dev/null
+++ b/module/idoutils/db/mysql/mysql-upgrade-1.3.0.sql
@@ -0,0 +1,18 @@
+-- -----------------------------------------
+-- upgrade path for Icinga IDOUtils 1.0.3
+--
+-- add index for statehistory
+-- -----------------------------------------
+-- Copyright (c) 2010 Icinga Development Team (http://www.icinga.org)
+--
+-- Initial Revision: 2010-11-04 Michael Friedrich <michael.friedrich(at)univie.ac.at>
+--
+-- Please check http://docs.icinga.org for upgrading information!
+-- -----------------------------------------
+
+-- -----------------------------------------
+-- add index for statehistory
+-- -----------------------------------------
+
+CREATE INDEX statehist_i_id_o_id_s_ty_s_ti on icinga_statehistory(instance_id, object_id, state_type, state_time);
+
diff --git a/module/idoutils/db/mysql/mysql.sql b/module/idoutils/db/mysql/mysql.sql
index 44ca48f..5d7906c 100644
--- a/module/idoutils/db/mysql/mysql.sql
+++ b/module/idoutils/db/mysql/mysql.sql
@@ -1556,3 +1556,5 @@ CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
 -- CREATE INDEX sched_d_t_start_time_idx on icinga_scheduleddowntime(scheduled_start_time);
 -- CREATE INDEX sched_d_t_end_time_idx on icinga_scheduleddowntime(scheduled_end_time);
 
+-- statehistory
+CREATE INDEX statehist_i_id_o_id_s_ty_s_ti on icinga_statehistory(instance_id, object_id, state_type, state_time);
diff --git a/module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql b/module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql
new file mode 100644
index 0000000..dcba97f
--- /dev/null
+++ b/module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql
@@ -0,0 +1,18 @@
+-- -----------------------------------------
+-- upgrade path for Icinga IDOUtils 1.0.3
+--
+-- add index for statehistory
+-- -----------------------------------------
+-- Copyright (c) 2010 Icinga Development Team (http://www.icinga.org)
+--
+-- Initial Revision: 2010-11-04 Michael Friedrich <michael.friedrich(at)univie.ac.at>
+--
+-- Please check http://docs.icinga.org for upgrading information!
+-- -----------------------------------------
+
+-- -----------------------------------------
+-- add index for statehistory
+-- -----------------------------------------
+
+CREATE INDEX statehist_i_id_o_id_s_ty_s_ti on statehistory(instance_id, object_id, state_type, state_time);
+
diff --git a/module/idoutils/db/oracle/oracle.sql b/module/idoutils/db/oracle/oracle.sql
index bbe69ec..b3a0711 100644
--- a/module/idoutils/db/oracle/oracle.sql
+++ b/module/idoutils/db/oracle/oracle.sql
@@ -1639,6 +1639,8 @@ CREATE INDEX loge_time_idx on logentries(logentry_time);
 -- CREATE INDEX sched_d_t_start_time_idx on scheduleddowntime(scheduled_start_time);
 -- CREATE INDEX sched_d_t_end_time_idx on scheduleddowntime(scheduled_end_time);
 
+-- statehistory
+CREATE INDEX statehist_i_id_o_id_s_ty_s_ti on statehistory(instance_id, object_id, state_type, state_time);
 
 -- -----------------------------------------
 -- triggers/sequences
diff --git a/module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql b/module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql
new file mode 100644
index 0000000..6b5cd59
--- /dev/null
+++ b/module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql
@@ -0,0 +1,18 @@
+-- -----------------------------------------
+-- upgrade path for Icinga IDOUtils 1.0.3
+--
+-- add index for statehistory
+-- -----------------------------------------
+-- Copyright (c) 2010 Icinga Development Team (http://www.icinga.org)
+--
+-- Initial Revision: 2010-11-04 Michael Friedrich <michael.friedrich(at)univie.ac.at>
+--
+-- Please check http://docs.icinga.org for upgrading information!
+-- -----------------------------------------
+
+-- -----------------------------------------
+-- add index for statehistory
+-- -----------------------------------------
+
+CREATE INDEX statehist_i_id_o_id_s_ty_s_ti on icinga_statehistory(instance_id, object_id, state_type, state_time);
+
diff --git a/module/idoutils/db/pgsql/pgsql.sql b/module/idoutils/db/pgsql/pgsql.sql
index 45bdacf..ffcbfe2 100644
--- a/module/idoutils/db/pgsql/pgsql.sql
+++ b/module/idoutils/db/pgsql/pgsql.sql
@@ -1564,5 +1564,7 @@ CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
 -- CREATE INDEX sched_d_t_start_time_idx on icinga_scheduleddowntime(scheduled_start_time);
 -- CREATE INDEX sched_d_t_end_time_idx on icinga_scheduleddowntime(scheduled_end_time);
 
+-- statehistory
+CREATE INDEX statehist_i_id_o_id_s_ty_s_ti on icinga_statehistory(instance_id, object_id, state_type, state_time);
 
 





More information about the icinga-checkins mailing list