Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-11-21 : 22:19:03
|
Chris Schultz writes "Is there a know procedure for which tables to join first and in which direction to make the join? I have one million records in a fact table and 40,000 in one dimension and 12,000 in another dimension. Should I join the dimensions to the fact or the fact to each dimension? Here is an northwinds example of different join scenarios with the same structure, unfortunately northwinds does not have enough data to see a speed difference.
SELECT Orders.*, [Order Details].* FROM [Order Details] INNER JOIN Orders ON [Order Details].OrderID = Orders.OrderID INNER JOIN Products ON [Order Details].ProductID = Products.ProductID
SELECT Orders.*, [Order Details].* FROM [Order Details] INNER JOIN Products ON [Order Details].ProductID = Products.ProductID INNER JOIN Orders ON [Order Details].OrderID = Orders.OrderID" |
|
|
|
|
|