select c_playlist *replace FROM ARRAY ppl_Temp for ix = 1 to alen(ppl_temp,1) && We only need ppl_temp rowcount updates update c_playlist ; set sequence = ppl_temp(ix,1) ; trt = ppl_temp(ix,2) ; where play_list_no=ppl_temp(ix,3) endforThis is with index :
select c_playlist * If not an already existing tag on play_list_no create it * Views can be indexed too. index on play_list_no tag plylstno && Tags are max 10 char *replace FROM ARRAY ppl_Temp for ix = 1 to alen(ppl_temp,1) && We only need ppl_temp rowcount updates if seek(ppl_temp(idx,3),"c_playlist","plylstno") replace sequence with ppl_temp(ix,1); trt with ppl_temp(ix,2) ; while play_list_no=ppl_temp(ix,3) endif endforIn your code go top is useless because a *for* forces it. And seeing do while expression I wonder if array rowcount is same as reccount. Anyway check new code timing. First w/o index and then with index. There are still many different ways to do it.