I have two tables that I load just in order to find which records appear in one and not in the other (its purely a validation process).
I thought I was making it easier but concatenating the three columns (in each table) into one called "KEY", indexing the KEY field in each, and then running a basic
Each table has about 2.3 million records, but it still seems to take f'rages.
I do recall someone telling me that a 'not in' is not very efficient, so which is the best way for me to deal with this then?
Thanks chaps.
Fee
The question should be [red]Is it worth trying to do?[/red] not [blue] Can it be done?[/blue]
I thought I was making it easier but concatenating the three columns (in each table) into one called "KEY", indexing the KEY field in each, and then running a basic
Code:
select * from BIGTABLE where key not in
(select key from SMALLERTABLE)
I do recall someone telling me that a 'not in' is not very efficient, so which is the best way for me to deal with this then?
Thanks chaps.
Fee
The question should be [red]Is it worth trying to do?[/red] not [blue] Can it be done?[/blue]