各位朋友:
delete from table_a a where a.account_item in( select /*+parallel (t,16)*/ tnode from table_b where rpt_code=0 and layer=4 )table_a表的数据有2千多万条,tabel_b表有3000多天。执行效率很慢。不知道怎么提供效率,优化。!!!
delete from table_a a where a.account_item in( select /*+parallel (t,16)*/ tnode from table_b where rpt_code=0 and layer=4 )table_a表的数据有2千多万条,tabel_b表有3000多天。执行效率很慢。不知道怎么提供效率,优化。!!!
table_a有分区没有?
数据量大采用exists来代替in
delete from table_a a where exists ( select /*+parallel (t,16)*/ 1 from table_b where rpt_code=0 and layer=4 and a.account_item=tnode)
3000多天??