row from heidisql and putty is not eqaul

dolsaem's profile image dolsaem posted 2 years ago in General Permalink

Hi, there.

The row of tb_bbs_board is 2,441,972. But when I count it at query tab, it is 1,116,997. I checked it with putty, it is 1,116,997.

How I can fix it?

Thanks.

3 attachment(s):
  • 001
  • 002
  • 003
ansgar's profile image ansgar posted 2 years ago Permalink

The row count in the database tab is not the result of a COUNT(*) query, but taken from a SHOW TABLE STATUS result, which returns an approximate number only for InnoDB tables.

See https://mariadb.com/kb/en/show-table-status/#description

Column Description
Rows Number of rows in the table. Some engines, such as XtraDB and InnoDB may store an estimate.
ansgar's profile image ansgar posted 2 years ago Permalink

Note that HeidiSQL intentionally avoids a COUNT(*) query, which would take much longer than a status query.

Please login to leave a reply, or register at first.