From 1712b74ff997d8d32b78781e514ed3f79a670817 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 26 Jul 2016 10:11:57 +0200 Subject: [PATCH] Index on count column to improve SUM queries MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- libs/lib_updates.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/lib_updates.php b/libs/lib_updates.php index 41762b8..197e984 100644 --- a/libs/lib_updates.php +++ b/libs/lib_updates.php @@ -77,6 +77,11 @@ FOREIGN KEY ( `ctracker_data_id` ) REFERENCES `' . $GLOBALS['ctracker_dbname'] . 5 => array( "ALTER TABLE `ctracker_data` ADD `request_method` VARCHAR( 255 ) NULL DEFAULT NULL COMMENT 'HTTP request method' AFTER `referer`, ADD INDEX ( `request_method` )", ), + + // Index on count + 6 => array( + 'ALTER TABLE `ctracker_data` ADD INDEX `count` (`count`)', + ), ); } -- 2.39.5