I have an INNODB table which has 99994 records in it. customer_number is the 
primary key.

If I run
select count(cutomer_number) from customer;

It takes about 15 seconds to return the number of rows.
I ran explain on the query and it's using the unique key index on 
customer_number.

If I run 
SHOW TABLE STATUS LIKE 'cutomer';
it only takes about 1.52 seconds for innodb to tell me number of rows.

Is there a faster way to get the number of rows without using 
"show table status" ?

I ran the same query on an oracle db with 1762058 rows and it took 8 seconds.

Thanks!
-- 
Walter Anthony
System Administrator
National Electronic Attachment
Atlanta, Georgia 
1-800-782-5150 ext. 1608
 "If it's not broke....tweak it"




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to