RDBPROD: Performance Advice on Using WHERE IN (SELECT FROM table)
(Doc ID 602499.1)
Last updated on JANUARY 03, 2019
Applies to:Oracle Rdb Server on OpenVMS - Version 22.214.171.124 and later
HP OpenVMS Itanium
HP OpenVMS Alpha
Performance advice on using WHERE IN (in-list) when the in-list is an embedded SELECT:
- TAB1 contains 2 million rows and TAB2 contains 50000. Both have indexes on COL1.
SQL> delete from tab1 where col1 in (select col1 from tab2);
- Performing the reverse, i.e. the delete is on the small table, the performance is very poor:
SQL> delete from tab2 where not in (select col1 from tab1 t1 where t1.col1 = col1);
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document