How to optimize delete query (with subquery) in Oracle?
问题 I have query like: delete from tableA where tableA.fk in (select id from tableB where tableB.column1='somevalue' and tableB.date between date1 and date2) ; Table tableB contains near 100,000,000 records. So select id from tableB where tableB.column1='somevalue' and tableB.date between date1 and date2 returns near 1,000,000 records. As result - delete doesn't work at all - problem with size of rollback segment. I cannot increase size of segment. How it can be executed? 回答1: If you are filling