I have 2 tables, TABLEA
and TABLEB
.
These contain pretty much the same data, around 90,000 records (30 fields)
There is a field, caller_id
that is in both tables.
What I'm trying to do, is to find records in TABLEB
that are in TABLEA
.
I currently have the following:
SELECT * FROM TABLEB
WHERE caller_id IN (SELECT caller_id FROM TABLEA)
This query is incredibly slow (takes over 2 minutes), which isn't ideal
Is there a way I can possibly speed this up?
Thanks
UPDATE
1 SIMPLE b ALL NULL NULL NULL NULL 11719 NULL
1 SIMPLE a ALL NULL NULL NULL NULL 11719 NULL