开发者

PHPMyAdmin - Total record count varies

I am running a re开发者_开发百科quest on a table of records with phpmyadmin, and the results count varies. For example, when showing the results it says "Showing records 1 - (~180,234 )".

This number changes each time I refresh, and no data is being added or removed.

When I do a SQL request for the record, the result stays the same. Is this an issue with phpMyAdmin?


For InnoDB tables, from phpMyAdmin's FAQ:

phpMyAdmin uses a quick method to get the row count, and this method only returns an approximate count in the case of InnoDB tables. See $cfg['MaxExactCount'] for a way to modify those results, but this could have a serious impact on performance.

http://docs.phpmyadmin.net/en/latest/config.html?highlight=maxexactcount#cfg_MaxExactCount


If you mouse over the "rows" column heading it says "May be approximate"

PHPMyAdmin - Total record count varies

It's because some types of tables only show an approximate count. I would add that it's also not always updated, so for example if you empty the table it can be showing a previous high number (so not even approximately correct!)

The above screenshot also says "Click on the number to get the exact count". This is not working for me, but one way to get an exact count for one or all tables (as a one-off refresh at least), is to tell phpMyAdmin to 'analyze' the table(s) like this:

PHPMyAdmin - Total record count varies

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜