I have 2 tables in Oracle8.1.7. Table A has 2 million rows, and Table B has 500,000 rows. Table B is a subset of Table A. Table A has referencial constraints to 3 other tables and CASCADE CONSTRAINTS is not enabled. How do I delete rows in Table A that don't exist in Table B, without using 'WHERE ... NOT IN' because the NOT IN disables the indexes and causes a full table scan for each row in Table B? How do I then delete the orphaned records in the 3 RI tables?
We are trying to find the solution that runs in the shortest amount of time.
Thanks.
We are trying to find the solution that runs in the shortest amount of time.
Thanks.