Which Sql is better?

admin

Administrator
Staff member
I have 2 points.

if i need to count record (PHP AND MYSQL), which way is the best one. (timing case)



1. "select count(*) from table where id = xxx"

2. "select * from table where id = xxx"
and using mysql_numrows
to get record count

Thanks
 
Back
Top