How to rewrite the below query by not using not exist and the performance is better than using not exist
SELECT m.member
FROM member m
WHERE 1 = 1
AND NOT EXISTS (
SELECT NULL
FROM history c
, tender t
WHERE 1 = 1
AND c.card_type = t.tender_type
AND c.member = m.member
AND 1 = 1 )
AND 1 = 1;
Thanks is advance for all your help.
You haven't described what problem you're trying to solve.
It looks like maybe you're trying to get a list of members who have no history?
Adding clarification to your question might help. Can you provide the DDL of your tables and explain in english what you would like the query to return?