0

I just created a table and ran a program which should add 170,256 rows.Then I checked the number of rows using PHP MyAdmin GUI. Below is the image.

enter image description here

According to the "Rows" column, I got only 162,230 rows! Then I ran the below query

SELECT COUNT(*) FROM `key_hash`

This generated the below result, which should be correct.


enter image description here


So my question is, how come the same thing display 2 different values? How should I know which is correct?

PeakGen
  • 21,894
  • 86
  • 261
  • 463
  • 1
    I think the key piece of information is right in front of you, namely "~" – Strawberry Apr 23 '14 at 11:45
  • If you run show table status from mydb like 'mytable' then it shows you estimated row count instead of exact rows..so php myadmin is using this to showing count of rows while sqlyog show exact rows. So to avoid this confusion you can use sqlyog instead of php myadmin...just for your information. – Zafar Malik Apr 23 '14 at 11:54

1 Answers1

1
SELECT COUNT(*) FROM `key_hash`

provides you with exact row count.

What you see in summary (162,230) is just estimation (hence ~ sign)

Here is more detailed explaination

Why is the estimated rows count very different in phpmyadmin results?

Community
  • 1
  • 1
mleko
  • 11,650
  • 6
  • 50
  • 71