At 10:47 PM 11/23/2006, John Kopanas wrote:
>That is awesome... thanks. I still am not sure exactly though why
>this take 2 seconds while my methond took over a minute for the same
>amount of rows. In essence don't the two methods do the same things?
No. Your approach was executing the subquery 2000 times for the 2000
records in your company file.
And will run 500,000 times when you go to production data. Somebody with
better math than I should try to project that.
His prep query runs once, and his update query runs once. Scales very nicely.
Barry Newton