Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

mysql - phpMyAdmin not showing all rows - wrong number of total records shown

I'm showing all rows (825) in phpMyAdmin v4.3.2 for a mysql innodb table sorted by the default autoincrement primary key. When sorted ascending, I go to the last page but it stops at id = 1150 when it should be id = 1337. The last 200 or so records do not display. When sorted descending, the records correctly start at the last record.

Oddly, increasing the number of rows per page give more of the missing rows and if I set it to 250 rows per page, they will all be there.

Any ideas why the result set is truncated? It seems as if phpMyAdmin is miscalculating number of pages.

UPDATE I upgraded to the latest version 4.5.0.2 and the problem persists.

UPDATE2 The query executed when entering the table is SELECT * FROM gems The result: Showing rows 0 - 24 (825 total, Query took 0.0000 seconds.)

When I do the query select count(*) from gems the result returns 997. So the problem is clearly in the estimated number of records phpMyAdmin thinks is there.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I found that I had the following setting in my phpMyAdmin config file pasted from who know what previous performance fix I made.

$cfg['MaxExactCount'] = 0

This disabled correcting InnoDB estimates. I commented out this line, and of course it took care of the problem


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...