diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 0f70fdcc6..c8b435df2 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -224,7 +224,8 @@ CREATE TABLE `Events_Hour` ( `StartTime` datetime default NULL, `DiskSpace` bigint unsigned default NULL, PRIMARY KEY (`EventId`), - KEY `Events_Hour_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) + KEY `Events_Hour_MonitorId_idx` (`MonitorId`) + KEY `Events_Hour_StartTime_idx` (`StartTime`) ) ENGINE=@ZM_MYSQL_ENGINE@; DROP TABLE IF EXISTS `Events_Day`; @@ -234,7 +235,8 @@ CREATE TABLE `Events_Day` ( `StartTime` datetime default NULL, `DiskSpace` bigint unsigned default NULL, PRIMARY KEY (`EventId`), - KEY `Events_Day_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) + KEY `Events_Day_MonitorId_idx` (`MonitorId`) + KEY `Events_Day_StartTime_idx` (`StartTime`) ) ENGINE=@ZM_MYSQL_ENGINE@; @@ -245,7 +247,8 @@ CREATE TABLE `Events_Week` ( `StartTime` datetime default NULL, `DiskSpace` bigint unsigned default NULL, PRIMARY KEY (`EventId`), - KEY `Events_Week_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) + KEY `Events_Week_MonitorId_idx` (`MonitorId`) + KEY `Events_Week_StartTime_idx` (`StartTime`) ) ENGINE=@ZM_MYSQL_ENGINE@; DROP TABLE IF EXISTS `Events_Month`; @@ -255,7 +258,8 @@ CREATE TABLE `Events_Month` ( `StartTime` datetime default NULL, `DiskSpace` bigint unsigned default NULL, PRIMARY KEY (`EventId`), - KEY `Events_Month_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) + KEY `Events_Month_MonitorId_idx` (`MonitorId`) + KEY `Events_Month_StartTime_idx` (`StartTime`) ) ENGINE=@ZM_MYSQL_ENGINE@; @@ -265,7 +269,7 @@ CREATE TABLE `Events_Archived` ( `MonitorId` int(10) unsigned NOT NULL, `DiskSpace` bigint unsigned default NULL, PRIMARY KEY (`EventId`), - KEY `Events_Month_MonitorId_idx` (`MonitorId`) + KEY `Events_Archived_MonitorId_idx` (`MonitorId`) ) ENGINE=@ZM_MYSQL_ENGINE@;