Bug 417 - Optimised Events indicies

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2252 e3e1d417-86f3-4887-817a-d78f3d33393f
pull/27/merge
stan 2007-12-09 13:44:47 +00:00
parent 5aad02876b
commit 3c842cf7df
2 changed files with 4 additions and 2 deletions

View File

@ -204,8 +204,7 @@ CREATE TABLE `Events` (
`Executed` tinyint(3) unsigned NOT NULL default '0',
`LearnState` char(1) default '',
`Notes` text,
PRIMARY KEY (`Id`),
KEY `Id` (`Id`,`MonitorId`),
PRIMARY KEY (`Id`,`MonitorId`),
KEY `MonitorId` (`MonitorId`),
KEY `StartTime` (`StartTime`),
KEY `Frames` (`Frames`),

View File

@ -52,6 +52,9 @@ alter table Frames drop index `UC_Id`;
alter table Users drop index `UC_Id`;
alter table ZonePresets drop index `UC_Id`;
alter table Zones drop index `UC_Id`;
alter table Events drop primary key;
alter table Events add primary key ( `Id`, `MonitorId` );
alter table Events drop index `Id`;
--
-- These are optional, but we might as well do it now