Hi,
We need to store many data elements (like Balance, Cost, Budget etc) for each account for varying time periods (month end, month to date, quarter end , quarter to date etc) for at least 5 years before archiving them.
To achieve the best performance for reporting, what would be the good design for this table (there will not be any transactional queries against table. It is meant to be for reporting purpose)?
Is it good to use a Time Dimension table and add the Dimension key to the main table?
OR
Have 2 tables (monthly and quarterly).
Monthly Table will be having Account No, Amount Type, Year, and Month 1 through Month 12 as column names
Quarterly Table will be having Account No, Amount Type, Year, and Quarter 1 through Quarter 4 as column names
Please suggest the best design for this requirement.
Thanks!