During my project, I came across a requirement where I need to process some operation over some address which is not present inside some other table, and for that, I have written the following query. But I think this query will go slow when the entries in the second table 'transaction' increases.
select emp_address
from emp_leave_wallet
where attached ="mycompany_wallet" and
emp_address not in (select destination_address from transaction);
Any other way, other than adding Index over destination_address.