Since "select count(*) from table_name" may be extremely heavy operation for huge InnoDB tables, you may execute EXPLAIN to get approximate number of rows.
EXPLAIN select count(*) from table_name;
This will work also for checking how many rows matching to some condition if covering index exists:
EXPLAIN select count(*) from table_name where index_column = v;
May 13, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment