View Single Post

   
  #4 (permalink)  
Old 02-29-2008, 03:58 AM
Greg D. Moore \(Strider\)
 
Posts: n/a
Default Re: Performance Tuning for Row-by-Row Update Statement


"Muzamil" <muzamil@hotmail.com> wrote in message
news:5a998f78.0405211023.24b40513@posting.google.c om...
> hi
>
> For an unavoidable reason, I have to use row-by-row processing
> (update) on a temporary table to update a history table every day.
> I have around 60,000 records in temporary table and about 2 million in
> the history table.


Not much you can do if you absolutely HAVE to do row-by-row updating.

You might want to post DDL, etc. so others can take a crack at it. I've
seen many times someone will say, "I have to use a cursor", "I have to
update one row at a time" and then someone posts a much better/faster
solution.

Also, how are you handling transactions? Explicitly or implicitely? If
you're doing them implicitely, are you wrapping each update in its own, or
can up batch say 20 updates?

Finally, where's your log files? Separate physical drives?


>
> Could any one please suggest different methods to imporve the runtime
> of the query?
>
> Would highly appreciate!



Reply With Quote