I am writing a simple trigger to tag lead duplicates based on two different fields, Email and our internal Lead ID (which we keep consisted between our own server DB and salesforce via integration).

Here is the initial trigger setup and the queries themselves, but I am getting `Non-selective Query` errors...

```
Map<ID, String> dupeFinderMap = new Map<ID, String>();
Map<String, ID> leadEmailMap = new Map<String, ID>();
Map<String, ID> leadILIDMap = new Map<String, ID>();

if(!trigger.isDelete) {
    for (Lead l : trigger.new){
        dupeFinderMap.put(l.id, '');
        leadEmailMap.put(l.Email, l.id);
        leadILIDMap.put(l.Internal_Lead_ID__c, l.id);
    }
} else {
    for (Lead l : trigger.old) {
        dupeFinderMap.put(l.id, '');
        leadEmailMap.put(l.Email, l.id);
        leadILIDMap.put(l.Internal_Lead_ID__c, l.id);
    }
}

List<Lead> dupeEmailLeads = [SELECT Id, Email, Internal_Lead_ID__c FROM Lead WHERE Email IN :leadEmailMap.keySet() AND Id NOT IN :dupeFinderMap.keySet()];
List<Lead> dupePILIDLeads = [SELECT Id, Email, Internal_Lead_ID__c FROM Lead WHERE Internal_Lead_ID__c IN :leadPILIDMap.keySet() AND Id NOT IN :dupeFinderMap.keySet()];

```

Is it something to do with the fact that I'm checking against a map keyset? Or is it the In or NOT IN conditions? Is there a better way to build these queries? My goal is to collect all Leads that have Email or Internal Lead ID the same as a Lead in the trigger, but are not in the trigger themselves.