Re: Poor performance for executing SELECT COUNT() for 50 000 records

2004-11-19 Thread Gleb Paharenko
Hello. InnoDB does not keep an internal count of rows in a table. (This would actually be somewhat complicated because of multi-versioning). To process a SELECT COUNT(*) FROM T statement, InnoDB must scan an index of the table, which will take some time if the table is not entirely in the

Re: Poor performance for executing SELECT COUNT() for 50 000 records

2004-11-18 Thread Heikki Tuuri
- From: Julian Legeny [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Thursday, November 18, 2004 5:22 PM Subject: Poor performance for executing SELECT COUNT() for 50 000 records Hello, I'm using MySQL 4.0.20a. I have a question about index performance for sql query SELECT COUNT