有一个innodb表与~3G文件大小(我使用innodb_file_per_table = 1),刚从dump和~1.3G转储文件导入.不知道这里有多少个recods.
当我从$ table执行"select count(id)"时,我看到"27117291"(27,117,291的可读性).当我从$ table limit 100执行"select count(id)"时,我也看到"27117291"
为什么会这样?InnoDB 真的更好MyISAM吗?!
PS如果我从$ table执行"select count(id),其中id = 73010460;" 我看到"1".
select count(id) from $table
Run Code Online (Sandbox Code Playgroud)
返回包含count的一行.所以你的限制没有区别.
(参考)
+-----------+
| COUNT(id) |
+-----------+
| <count> |
+-----------+
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
260 次 |
| 最近记录: |