0

I am using the following query to get approximate row counts in a mysql table:

SELECT table_name, table_rows
FROM INFORMATION_SCHEMA.TABLES 
WHERE TABLE_SCHEMA = 'avails';

enter image description here

My questions is, is there an additional parameter that shows if the row count is exact or approximated? If not, how is this done in a client like SequelPro where it can show an immediate number of table rows, and it will add a tilda (~) if it is not an exact count?

enter image description here

enter image description here

David542
  • 104,438
  • 178
  • 489
  • 842
  • ***Is there an additional parameter that shows if the row count is exact or approximated?*** No. http://stackoverflow.com/questions/286039/get-record-counts-for-all-tables-in-mysql-database however provides an example on how to use system tables to dynamically query counts for all tables to get an exact count. – xQbert Jan 13 '16 at 19:29
  • @xQbert got it, thank you. Then how does a client like SequelPro know if it's exact or approximate? It isn't using COUNT(*) because the # rows loads instantaneously. – David542 Jan 13 '16 at 19:48
  • Based on [this OLD document/link](https://code.google.com/p/sequel-pro/issues/detail?id=141) All I can gather is if they query system tables they use a ~ if they query the table using count(*) then they don't. – xQbert Jan 13 '16 at 20:22

0 Answers0