工作中,经常会使用到批量更新sql的语句,有时涉及的数据量还很大,执行时间较长。与同事交流中学习了一个优化的小技巧,就是使用表的hash值:
update /*+ use_hash(s ts) */ tms_spe_order s set s.bill_source='2'
where
exists(select 1 from temp_order_002 ts
where s.top_bill_code=ts.top_bill_code)
;
工作中,经常会使用到批量更新sql的语句,有时涉及的数据量还很大,执行时间较长。与同事交流中学习了一个优化的小技巧,就是使用表的hash值:
update /*+ use_hash(s ts) */ tms_spe_order s set s.bill_source='2'
where
exists(select 1 from temp_order_002 ts
where s.top_bill_code=ts.top_bill_code)
;