0

Whenever I refresh or search anything in the table in mysql, the result message always shows result like this.

Showing rows 0 - 10 ( ~11 total , Query took 0.0004 sec)

When it is showing the exact number of rows why it is always show a "~" sign before the total values.

This sign indicates that this table has "nearly 11 rows" or "approximate 11 rows" but that's not true. It has exactly 11 rows. So why this sign.

We use this signs only when we dont have the exact values for result or anything.

I read the FAQs about this saying that.

phpMyAdmin uses a quick method to get the row count, and this method only returns an approximate count in the case of InnoDB tables. See $cfg['MaxExactCount'] for a way to modify those results, but this could have a serious impact on performance.

and the method used in this statement shows these lines

For InnoDB tables, determines for how large tables phpMyAdmin should get the exact row count using SELECT COUNT. If the approximate row count as returned by SHOW TABLE STATUS is smaller than this value, SELECT COUNT will be used, otherwise the approximate count will be used. 

I didn't understand these lines what are they trying to say.

Waseem
  • 223

1 Answers1

0

You sort of answered the question yourself, but let me elaborate a bit. Because phpMyAdmin always uses the same quick method to count rows, it isn't always exact. The larger the data, the greater the chance of it being inaccurate. phpMyAdmin doesn't check to see if the count is accurate (that would defeat the purpose of the quick count) so it doesn't know when it happens to be exact. It's easier (and safer) to always err on the side of caution and assume it might be inaccurate.

Drakkim
  • 21