【发布时间】:2012-11-03 23:20:42
【问题描述】:
有一个 ~3G 文件大小的 innodb 表(我使用 innodb_file_per_table = 1),刚从转储文件和 ~1.3G 转储文件导入。不知道这里有多少记录。
当我执行“select count(id) from $table”时,我看到“27117291”(为了便于阅读,为 27,117,291)。 当我执行“select count(id) from $table limit 100”时,我还会看到“27117291”
为什么会这样? InnoDB 真的 比 MyISAM 更好吗?!
附:如果我执行“select count(id) from $table where id=73010460;”我看到“1”。
【问题讨论】:
-
有什么问题?对我来说,一切似乎都正常。
-
limit 100 表示取前 100 行,不是吗?