Are there any plans on improving count(*)'s speed?
I decided to give InnoDB a try, mainly because I care about integrity and being able to have true relations. Now, simple queries like:
SELECT u.id, u.username, y.difboards
FROM (
SELECT user_id, count( DISTINCT board_id ) AS difboards
FROM messages
GROUP BY user_id
ORDER BY difboards DESC
LIMIT 0 , 30
) AS y
inner join users u on u.id = y.user_id
That used to take 3 seconds (4.6 million rows in messages table) take a reaaaally long time. I had already denormalized the table for that query (3 seconds is too much for any user), but to avoid that kind of queries, I denormalized the DB even more, which shouldn't be necessary.
Why is it necessary to lack the speed of MyISAM for counts?
Subject
Views
Written By
Posted
Are there any plans on improving count(*)'s speed?
3215
January 19, 2009 03:48AM
1645
January 19, 2009 04:33PM
1855
January 19, 2009 11:45PM
2182
January 20, 2009 02:17AM
1955
January 21, 2009 07:41PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.