select from merge quicker than individual tables
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,
Subject
Views
Written By
Posted
select from merge quicker than individual tables
8645
October 03, 2006 10:47AM
4788
October 04, 2006 11:29AM
4480
October 05, 2006 07:10AM
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.