This is a discussion on Two fact tables with one-to-many relationship? within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> I had a huge fact table with the following structure. fact1 (Fact1ID, D1, D2,... M1, M2, M3....) where PK ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I had a huge fact table with the following structure. fact1 (Fact1ID, D1, D2,... M1, M2, M3....) where PK is Fact1ID, D1, D2,... are dimension key and M1, M2, M3 are measures. Now I need add a new fact table fact2, which has many-to-one relationship ([1-365] to 1) to fact1, fact2(Fact1ID, Date, Dx, Dy,..., Mx, My....), which Fact1ID and Date are PK of this fact table. (fact2 are the daily data of fact1) Some reporting queries need to join these two huge table and they are very slow. Any better design? Or just put D1, D2, ... from fact1 to fact2? |