[icinga-checkins] icinga.org: icinga-core/master: enable index on icinga_logentries. logentry_time so regular queries from

git at icinga.org git at icinga.org
Mon Jul 19 08:12:52 CEST 2010


Module: icinga-core
Branch: master
Commit: 5a357937f1ac5481fde29880c77314764eae3a0f
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=5a357937f1ac5481fde29880c77314764eae3a0f

Author: Christoph Maser <cmr at financial.com>
Date:   Fri Feb  5 12:13:07 2010 +0100

enable index on icinga_logentries.logentry_time so regular queries from
icinga-web will not do full table scans regularly
fixes #236

---

 module/idoutils/db/mysql/mysql-upgrade-1.0.1.sql   |    3 ++-
 module/idoutils/db/mysql/mysql.sql                 |    3 ++-
 module/idoutils/db/oracle/oracle-upgrade-1.0.1.sql |    3 ++-
 module/idoutils/db/oracle/oracle.sql               |    3 ++-
 module/idoutils/db/pgsql/pgsql-upgrade-1.0.1.sql   |    3 ++-
 module/idoutils/db/pgsql/pgsql.sql                 |    3 ++-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/module/idoutils/db/mysql/mysql-upgrade-1.0.1.sql b/module/idoutils/db/mysql/mysql-upgrade-1.0.1.sql
index dedc305..30d7cc9 100644
--- a/module/idoutils/db/mysql/mysql-upgrade-1.0.1.sql
+++ b/module/idoutils/db/mysql/mysql-upgrade-1.0.1.sql
@@ -176,7 +176,8 @@ CREATE INDEX objects_inst_id_idx ON icinga_objects(instance_id);
 
 -- logentries
 -- CREATE INDEX loge_instance_id_idx on icinga_logentries(instance_id);
--- CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
+-- #236
+CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
 -- CREATE INDEX loge_data_idx on icinga_logentries(logentry_data);
 
 -- commenthistory
diff --git a/module/idoutils/db/mysql/mysql.sql b/module/idoutils/db/mysql/mysql.sql
index 33a04ea..dce4163 100644
--- a/module/idoutils/db/mysql/mysql.sql
+++ b/module/idoutils/db/mysql/mysql.sql
@@ -1530,7 +1530,8 @@ CREATE INDEX objects_inst_id_idx ON icinga_objects(instance_id);
 
 -- logentries
 -- CREATE INDEX loge_instance_id_idx on icinga_logentries(instance_id);
--- CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
+-- #236
+CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
 -- CREATE INDEX loge_data_idx on icinga_logentries(logentry_data);
 
 -- commenthistory
diff --git a/module/idoutils/db/oracle/oracle-upgrade-1.0.1.sql b/module/idoutils/db/oracle/oracle-upgrade-1.0.1.sql
index 7a9befc..3cf9799 100644
--- a/module/idoutils/db/oracle/oracle-upgrade-1.0.1.sql
+++ b/module/idoutils/db/oracle/oracle-upgrade-1.0.1.sql
@@ -191,7 +191,8 @@ CREATE INDEX objects_inst_id_idx ON objects(instance_id);
 
 -- logentries
 -- CREATE INDEX loge_instance_id_idx on logentries(instance_id);
--- CREATE INDEX loge_time_idx on logentries(logentry_time);
+-- #236
+CREATE INDEX loge_time_idx on logentries(logentry_time);
 -- CREATE INDEX loge_data_idx on logentries(logentry_data);
 
 -- commenthistory
diff --git a/module/idoutils/db/oracle/oracle.sql b/module/idoutils/db/oracle/oracle.sql
index 09a2f6f..4be7fe2 100644
--- a/module/idoutils/db/oracle/oracle.sql
+++ b/module/idoutils/db/oracle/oracle.sql
@@ -1579,7 +1579,8 @@ CREATE INDEX objects_inst_id_idx ON objects(instance_id);
 
 -- logentries
 -- CREATE INDEX loge_instance_id_idx on logentries(instance_id);
--- CREATE INDEX loge_time_idx on logentries(logentry_time);
+-- #236
+CREATE INDEX loge_time_idx on logentries(logentry_time);
 -- CREATE INDEX loge_data_idx on logentries(logentry_data);
 
 -- commenthistory
diff --git a/module/idoutils/db/pgsql/pgsql-upgrade-1.0.1.sql b/module/idoutils/db/pgsql/pgsql-upgrade-1.0.1.sql
index 4858933..8685139 100644
--- a/module/idoutils/db/pgsql/pgsql-upgrade-1.0.1.sql
+++ b/module/idoutils/db/pgsql/pgsql-upgrade-1.0.1.sql
@@ -187,7 +187,8 @@ CREATE INDEX objects_inst_id_idx ON icinga_objects(instance_id);
 
 -- logentries
 -- CREATE INDEX loge_instance_id_idx on icinga_logentries(instance_id);
--- CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
+-- #236
+CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
 -- CREATE INDEX loge_data_idx on icinga_logentries(logentry_data);
 
 -- commenthistory
diff --git a/module/idoutils/db/pgsql/pgsql.sql b/module/idoutils/db/pgsql/pgsql.sql
index 409b7ac..7f04af4 100644
--- a/module/idoutils/db/pgsql/pgsql.sql
+++ b/module/idoutils/db/pgsql/pgsql.sql
@@ -1542,7 +1542,8 @@ CREATE INDEX objects_inst_id_idx ON icinga_objects(instance_id);
 
 -- logentries
 -- CREATE INDEX loge_instance_id_idx on icinga_logentries(instance_id);
--- CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
+-- #236
+CREATE INDEX loge_time_idx on icinga_logentries(logentry_time);
 -- CREATE INDEX loge_data_idx on icinga_logentries(logentry_data);
 
 -- commenthistory





More information about the icinga-checkins mailing list