我有以下查询:
UPDATE `users` SET `time-spent-online` = `time-spent-online` + 10 WHERE `id` = 1
MyISAM 表执行哪个:
1 row affected. ( Query took 0.0008 sec )
对于InnoDB
表执行:
1 row affected. ( Query took 0.0174 sec )
InnoDB 这么慢是正常的吗?我应该改用 MyISAM 吗?我害怕 MyISAM 的表锁定。如果我有 1000 个用户,并且每 10 秒为每个在线用户执行一次此查询会怎样?