如关于table_rows
对于其他存储引擎(例如InnoDB),此值是一个近似值,并且可能从实际值不高达40%至50%。在这种情况下,使用Select Count(*)获得准确的计数。
我的问题是,对于非空表来说, table_rows是否可能为0
?
我已经运行了多个测试,并且该值始终更新为 0
或大于0
,具体取决于我采取的操作(插入到空表格或删除全部)。但是有人能说我可以依靠这种行为吗?
As stated in mysql information schema about TABLE_ROWS
For other storage engines, such as InnoDB, this value is an approximation, and may vary from the actual value by as much as 40% to 50%. In such cases, use SELECT COUNT(*) to obtain an accurate count.
My question is, is it possible that TABLE_ROWS will be 0
for non-empty table?
I've run multiple tests, and the value was always updated to 0
or bigger than 0
depending on the action that I took (insert to empty table or delete all). But is anyone able to tell that I can rely on this behavior?
发布评论