I have a batch class to process some records Select Field1, Field2 from Object where Lookup_Field__c != null && Date_Field__c in (Date1, Date2)
Now the Object that this query is on has more than 7 million records and growing. There are very few records that have Lookup_Field__c populated(about 0.1% of the total data volume)
Even though the Lookup_Field__c is indexed, as per the database query optimizer cheatsheet it is mentioned that having a != in the query filter makes the filter conditions unselective. The Date field used in the query is currently not indexed.
Hence my question is, will the above query degrade my batch class to the point of causing the query to fail? Is there a better recommended approach for the same?