View Single Post
  #3 (permalink)  
Old 06-26-09, 04:46
alphaprime alphaprime is offline
Registered User
 
Join Date: Jun 2009
Posts: 5
Hi,

As i was stating in the code comments, the reason for the #temp table was because of a more complicated preprocessing to choose which rows in Table1 to update with. The select into #temp was ONLY a sample but NOT the real code for building the #temp table. Of course if I am simply updating using the date on Col5 then I don't need the #temp table.

Ok ok. The #temp table was actually created using bcp in of a set of new data from data files coming in from 3rd parties. And these 80% of data in these files are already in Table1 from previous imports. So for these 80% of rows, instead of reinserting them into Table1, I just want to update the date time that their are reupdated. And this is the update statement for.

Table1 got 2.5 Million rows in it.

So you think I should index Col1, Col2, Col3 of the #temp table? Table1 already indexed with Col1, Col2, Col3 in 1 index.

Thx for ur help.
Reply With Quote