select count(*) from table is the fastest for myisam because it caches row count. This will also include any rows that have null values.

select count(col) from table will not count rows where that column is null and will also be forced to access the index or data file.

-Eric

Brian Dunning wrote:

I've been doing the following to get the record count from a db. Is this the fastest?

select count(id) as `count` from tablename;



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to