Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

After converted a table from MyISAM to InnoDB, "show table status" command returns different row numbers to correct figure showed by "count(*)" command. That's probably due to compact row format used in InnoDB tables.

I wonder if there is a way to quickly get correct row numbers for all tables on InnoDB engine by "show table status" command just like what it shows for MyISAM tables.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I think you are out of luck. From the fine manual at:

http://dev.mysql.com/doc/refman/5.1/en/show-table-status.html

The number of rows. Some storage engines, such as MyISAM, store the exact count. For other storage engines, such as InnoDB, this value is an approximation, and may vary from the actual value by as much as 40 to 50%. In such cases, use SELECT COUNT(*) to obtain an accurate count.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.