NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL doubt

Mark Horton mark at nostromo.net
Fri Jan 14 10:49:07 EST 2005


Sajith A wrote:
> I'm not sure whether i should post this here. Correct me if i'm
> wrong.. I would like to know
> whether there is any performance difference between. "SELECT count(*)
> FROM table" and "SELECT count(field) FROM table".

Mysql has different table types.  MyISAM tables always know the number 
of rows within the table.  The result of "SELECT (*) from table" is 
always known and should return instantly.

This may not work on other table types however.  For instance, it does 
not work for InnoDB tables.

Mark



More information about the talk mailing list