|
Posted by Doug on 12/12/05 03:04
put a single index on the main fact table on "Order_num" assuming this
is a somewhat unique piece of data.
Then, DELETE from your temp table everything that already exists in the
main fact table. This will allow the engine to do a single scan on the
temp table, efficiently look it up in the fact table using a FAST
index, and get rid of dups.
Then, just add what is left of the temp table to the main fact table.
Using this approach, you will never have to do a scan of the main fact
table, ESPECIALLY not a scan for EVERY record in the temp table.
Throwing indexes onto the fact table for non-unique items is generally
a bad thing, and slows things down.
[Back to original message]
|