Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPMyAdmin - Total record count varies

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?

like image 839
Designer023 Avatar asked Feb 14 '11 14:02

Designer023


People also ask

How to count all records in MySQL?

MySQL COUNT() Function The COUNT() function returns the number of records returned by a select query.

What does SELECT count return?

COUNT(*) returns the number of rows in a specified table, and it preserves duplicate rows. It counts each row separately. This includes rows that contain null values.

How to count columns in MySQL?

mysql> SELECT COUNT(*) AS NUMBEROFCOLUMNS FROM INFORMATION_SCHEMA. COLUMNS -> WHERE table_schema = 'business' AND table_name = 'NumberOfColumns'; The output displays the number of columns.


1 Answers

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

like image 155
Chris Baker Avatar answered Oct 16 '22 02:10

Chris Baker