title: Using count(*) vs num_rows
body: <p>To get number of rows in result set there are two ways:</p>
  
  <ol>
  <li><p>Is to use query to get count</p>
  
  <p><code>$query="Select count(*) as count from some_table where type='t1'";</code></p>
  
  <p>and then retrieving the value of count.</p></li>
  <li><p>Is getting count via num_rows(), in php.</p></li>
  </ol>
  
  <p>so which one is better performance wise?</p>