How to do a fast but innacurate InnoDB row count?

前端 未结 1 1763
自闭症患者
自闭症患者 2020-12-29 21:16

The FAQ of PHPMyAdmin has this to say about its approximate row counts for InnoDB:

phpMyAdmin uses a quick method to get the row count, and this metho

相关标签:
1条回答
  • 2020-12-29 22:16

    They do this:

    SHOW TABLE STATUS LIKE 'foo';
    

    This returns a 'Rows' column. With MyISAM it's 100% accurate, InnoDB just guesses. This is why MyISAM is faster than InnoDB when doing a 'SELECT COUNT(*)' query without a where clause.

    phpMyAdmin is open-source, so you can just go into the code and see for yourself!

    0 讨论(0)
提交回复
热议问题