find rows in one table but not the other
I have two tables that represent two instances of the same type of data. I need to know if any rows have been dropped between table1 and table2. The problem is that these tables have about 35 million records each and I cannot afford to do a full scan of 35 million records in table2 for each of the 35 million records in table1.
The standard
select p_key from table1 where p_key not in (select p_key from table2)
seems to run very inefficently.
Any suggestion? Thanks alot, I cannot afford to let this run for 90 hours.