   `source_ip` varchar(255) NOT NULL DEFAULT '0.0.0.0',
   `total` int(20) NOT NULL,
   PRIMARY KEY (`id`,`from_date`),
-  UNIQUE KEY `datemethod` (`to_date`,`method`,`source_ip`),
+  UNIQUE KEY `datemethod` (`from_date`,`to_date`,`method`,`source_ip`),
   KEY `from_date` (`from_date`),
   KEY `to_date` (`to_date`),
   KEY `method` (`method`)

  `method` varchar(50) NOT NULL DEFAULT '',
  `total` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`from_date`),
  UNIQUE KEY `datemethodua` (`to_date`,`method`,`useragent`),
  KEY `from_date` (`from_date`),
  KEY `to_date` (`to_date`),
  KEY `useragent` (`useragent`),

  `totag` tinyint(1) NOT NULL,
  `total` int(20) NOT NULL,
  PRIMARY KEY (`id`,`from_date`),
  UNIQUE KEY `datemethod` (`from_date`,`to_date`,`method`,`auth`,`totag`,`cseq`),
  KEY `from_date` (`from_date`),
  KEY `to_date` (`to_date`),
  KEY `method` (`method`),
