will show table status display exact rows in the table?

后端 未结 2 1268
抹茶落季
抹茶落季 2021-01-25 14:34

I have a table in DB and it is approx 90 GB in space. I tried to count no of rows in the table select count(idNewsNotification) from notification and it resulted <

2条回答
  •  盖世英雄少女心
    2021-01-25 15:26

    This is not a good one, in some cases.

    For InnoDB tables, the row count is only a rough estimate used in SQL optimization. (This is also true if the InnoDB table is partitioned.)

    TEST:

    I have the same db (dumped and imported on different server) both innoDB

    Same table:

    Server One: 49,231
    Server Two: 53,242
    

    49231 is not correct and You can see this table with "~" mark in phpmyadmin

提交回复
热议问题