Re: Query optimization or better table design?
Shoveling thru millions of rows takes time. Period.
So, the 'right' way to deal with this 'report' on your 'data warehouse' is to create a summary table(s).
Every day (say), you run a script
INSERT INTO summary_table
SELECT day, domain_id,
COUNT(*), SUM(...)
FROM fact_table
WHERE day ... # yesterday
GROUP BY day, domain_id
Then run your report from that table. It will be plenty fast.
Subject
Written By
Posted
Re: Query optimization or better table design?
May 03, 2009 10:49PM
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.