title: Best way to count rows from mysql database
body: <p>After facing a slow loading time issue with a mysql query, I'm now looking the best way to count rows numbers. I have stupidly used <code>mysql_num_rows()</code> function to do this and now realized its a worst way to do this.
  I was actually making a Pagination to make pages in PHP.
  I have found several ways to count rows number. But I'm looking the faster way to count it.</p>
  
  <p>The table type is MyISAM</p>
  
  <p>So the question is now </p>
  
  <p>Which is the best and faster to count - </p>
  
  <pre><code>1. `SELECT count(*) FROM 'table_name'`
  
  2. `SELECT TABLE_ROWS
  FROM INFORMATION_SCHEMA.TABLES WHERE table_schema =  'database_name'
  AND table_name LIKE  'table_name'`
  
  3. `SHOW TABLE STATUS LIKE 'table_name'`
  
  4. `SELECT FOUND_ROWS()`
  </code></pre>
  
  <p>If there are others better way to do this, please let me know them as well.
  If possible please describe along with the answer- why it is best and faster. So I could understand and can use the method based on my requirement.</p>
  
  <p>Thanks.</p>