peternolan9
Hi All,
We have been doing some pretty extensive testing on star joins and I thought I would share the results we can publicly here......those who want to contact me directly are welcome to at peter@peternolan.com. Or post questions to this thread....
We have made star joins work reliably. What we did was remove clustering create partitioned tables and put indexes containing many of the join columns in them. Once we were up over the 10M mark in the fact tables the start join kicked in pretty reliably. While we were down below 10M...and my early tests were on 5M row tables......the star joins would not kick in....and we never got them to kick in on unpartitioned fact tables.......
So, to repeat, the only way we got star joins to work on 2005 was unpartitioned fact tables over 10M rows.
Although, it really does not seem to matter.....
The other experiment we tried was to follow the DB2 optimiser documentation and set up the SQL Server tables exactly as recommended for DB2......mostly on the basis that if MSFT had copied the DB2 optimiser behavior then SQL Server would work the same way....
And so it was.....
So we found that the best way to set up a fact table is to create a partitioned clustered fact table with aligned indexes. And place an index on each of the fact table keys that will be used to join dimension tables on a regular basis. We implemented multiple levels of partitioning on a multi-part 'partitioning column' that is an integer.......
We have implemented a template fact table and now we will go forward with all fact tables implemented in exactly the same way.......
Even when the optimiser picked the cartesian product for unclustered fact tables the clustered fact table based query ran more quickly......
Though, of course, there is a very severe overhead for inserting and updating clustered fact tables in SQL Server......but it looks like we have to 'pay the piper' on update to get the query performance we are after....
Best Regards
Peter Nolan
www.peternolan.com
(Alas, becoming far too much of an sql server dba)