CREATE TABLE `past30` ( `vid` int(10) unsigned NOT NULL, `date` timestamp NOT NULL default '0000-00-00 00:00:00', `count` int(10) unsigned NOT NULL, PRIMARY KEY (`vid`,`date`), KEY `date` (`date`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; insert into past30 values(1, now(), 1); insert into past30 values(2, now(), 1); insert into past30 values(3, now(), 1); insert into past30 values(4, now(), 1); insert into past30 values(5, now(), 1); insert into past30 values(6, now(), 1); insert into past30 values(7, now(), 1); insert into past30 values(8, now(), 1); insert into past30 values(9, now(), 1); insert into past30 values(10, now(), 1); insert into past30 values(11, now(), 1); flush status; SHOW STATUS LIKE 'Handler%'; update past30 set count=100 where vid='-1'; SHOW STATUS LIKE 'Handler%'; select * from past30 where vid='-1'; SHOW STATUS LIKE 'Handler%';