I have a table t1 with 5 million records
I have to update col2 of the table t1 as follows:
update t1 set col2=1 where col2=a;
update t1 set col2=2 where col2=b;
update t1 set col2=3 where col2=c;
update t1 set col2=4 where col2=d;
update t1 set col2=5 where col2=e;
and so on for 400 more values.
Please let me know is there a better way of updating the col2 of t1 instead of firing so many update statements can I do it with a single update?
if so then how and how will it affect the performance?
Please note that 1,2,3 and a,b,c,.. can be any var cahr values.
It would also be great if you can send the approximate performance numbers expected.
would it be 1 min, 10 min, 1 hour etc for the above scenario.
At present there is no index, Would indexing help in the update?
Thanks and Regards
October 6, 2004 10:22 PM
October 7, 2004 11:19 AM