From: Dan Nelson Date: June 28 2002 10:36pm Subject: Re: InnoDB - count() slow List-Archive: http://lists.mysql.com/mysql/113373 Message-Id: <20020628223621.GB18990@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Jun 29), Oleg said: > Hello, > > The query SELECT COUNT(*) FROM table works very slow - for 50 millions > of records it tooks around 5-10 minutes. > Is it a bug or a feature? "Feature". Innodb tables do not cache the rowcount like MyISAM tables do, so mysql has to walk the entire table to get a count. If you have a unique index, it should be able to scan that instead, which will be faster. -- Dan Nelson dnelson@stripped