I have to count the total numbers of records from my database. I want to know the efficient/faster way for MySQL to do this. I can use:
(1)
$rslt=mysql_query("select * from table");
$count = mysql_num_rows($rslt);
or (2) by using the following query:
select count(*) from table;
Which QUERY to the database is efficient?