From 258d7dbafba48c2da3896ff6a30851003022881b Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 21 Aug 2013 00:10:50 +0200 Subject: [PATCH] Did measurements, leads to new index suggestions --- modules/monitoring/library/Monitoring/Backend/Ido.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido.php b/modules/monitoring/library/Monitoring/Backend/Ido.php index 53cd18073..10ede9aca 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido.php @@ -18,8 +18,15 @@ use Icinga\Data\Db\Connection; * * Other possible (history-related) indexes, still subject to tests: * CREATE INDEX web2_index ON icinga_statehistory (object_id, state_time DESC); - * CREATE INDEX web2_index ON icinga_notifications (object_id, instance_id, start_time DESC); - * CREATE INDEX web2_index ON icinga_downtimehistory (object_id, actual_start_time, actual_end_time); + * CREATE INDEX web2_time ON icinga_statehistory (state_time DESC); + * CREATE INDEX web2_index ON icinga_notifications (object_id, start_time DESC); + * CREATE INDEX web2_start ON icinga_downtimehistory (actual_start_time); + * CREATE INDEX web2_end ON icinga_downtimehistory (actual_end_time); + * CREATE INDEX web2_index ON icinga_commenthistory (object_id, comment_time); + * CREATE INDEX web2_object ON icinga_commenthistory (object_id); + * CREATE INDEX web2_time ON icinga_commenthistory (comment_time DESC); + * + * CREATE INDEX web2_notification_contact ON icinga_contactnotifications (contact_object_id, notification_id); * * These should be unique: * CREATE INDEX web2_index ON icinga_host_contacts (host_id, contact_object_id);