MySQL Forums
Forum List  »  Merge Storage Engine

select from merge quicker than individual tables
Posted by: Gordon Marshall
Date: October 03, 2006 10:47AM

I have created identical tables a_action_log and b_action_log and then created a merge table called action_log. All inserts are via the merge table, the method is last, and therfore into b_action_log. a_action_log has 28121026 rows whilst b_action_log currently has only 23424 rows.

A select from a_action_log (using indexes) takes 40 seconds, whilst the same select from action_log (the merged table) only takes 3 seconds. The select was along the lines of:

SELECT action_type, COUNT(*) FROM action_log
WHERE client=%s AND time BETWEEN %s AND %s
GROUP BY action_type;

with indexes on (client, time) and (client, action_type, time) present.

Would anyone be able to explain why?

Thank you,

Options: ReplyQuote


Subject
Views
Written By
Posted
select from merge quicker than individual tables
8667
October 03, 2006 10:47AM


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.