Hi Experts,
I want to update a column (Value1) in SYbase IQ 16.
Table Contains approx 2 crore records.
I have created a simple procedure using cursor.
It works fine with less records but has a performance issue with large dataset.
CREATE OR REPLACE PROCEDURE TEMP()
BEGIN
declare @temp1 int;
declare @rnum int;
declare @count int;
declare c1 DYNAMIC SCROLL cursor for select rownum from temp;
open c1;
fetch next c1 into @rnum;
while(@@FETCH_STATUS = 0)
Loop
set @temp1= cast(rand()*10000 AS INT);
update temp
set VALUE1=@temp1
where rownum=@rnum;
Fetch next c1 into @rnum;
End loop;
close c1;
deallocate cursor c1;
commit;
END;
As sybase is columnar database is there any other method to increase the performance of updation activity.
Regards,
Neha Khetan