7

I am running a request 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?

4
  • What storage engine are you using? Can you drop in your schema for that table? Commented Feb 14, 2011 at 14:49
  • The engin I am using is MyISAM. I can't put the schema on as it is something which i'm not allowed to share unfortunately. Commented Feb 14, 2011 at 14:53
  • Are you certain the engine is not InnoDB for that specific table? Also, does this issue affect all tables in the database, or only certain ones? Commented Feb 14, 2011 at 15:02
  • Use SHOW CREATE TABLE tbl_name and then check the engine at the end of the returned create string. Commented Feb 14, 2011 at 15:06

2 Answers 2

8

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

1

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

enter image description here

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:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.