On Tue, Jul 16, 2002 at 03:52:35PM -0400, walt wrote: > 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.
That's documented. InnoDB must read the whole table. > If I run > SHOW TABLE STATUS LIKE 'cutomer'; > it only takes about 1.52 seconds for innodb to tell me number of rows. That's an estimate of the number of rows. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ MySQL 3.23.51: up 47 days, processed 1,019,366,418 queries (246/sec. avg) --------------------------------------------------------------------- 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