250w數據15秒
declare
maxrows number default 5000;
row_id_table dbms_sql.Urowid_Table;
p_id_table dbms_sql.Varchar2_Table;
cursor acnt_first_cur is
select /*+ use_hash(t1) parallel(t1,8) */
t1.key, t1.rowid
from t_file_chunk_manage t1
order by t1.rowid;
begin
open acnt_first_cur;
loop
exit when acnt_first_cur%notfound;
fetch acnt_first_cur bulk collect
into p_id_table, row_id_table limit maxrows;
forall i in 1 .. row_id_table.count
update t_file_chunk_manage
set file_simple_md5 = p_id_table(i)
where rowid = row_id_table(i);
commit;
end loop;
end;