日期:2014-05-17 浏览次数:21148 次
--删除的数据量为2万条
--table1 数据量为百万级,table2为时间窗 仅一条记录
DELETE /*+ BYPASS_UJVC*/
FROM (SELECT
A.*
FROM table1 A, table2 B
WHERE A.INSERTDATE >= B.ETLNOWSTATDATE
AND A.INSERTDATE <= B.ETLLASTENDDATE) ;
--执行0.01s
delete from table1 a
where a.INSERTDATE >= (select b.statdate from table2 b)
and a.INSERTDATE <= (select b.enddate from table2 b)
--执行90s