I get this error..
System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)
on this line...
for(SUBSCR_SYSTEMS__c s:[select Account__c,CUST_NUM__c from SUBSCR_SYSTEMS__c where CUST_NUM__c!=null and CUST_NUM__c IN: shipTo])
{ }
I have researched a lot on working with large SOQL queries. To avoid non-selective error I added CUST_NUM__c!=null. I have converted the field CUST_NUM__c to a external ID field so that it is indexed. But I'm still unable to find a solution and get this error.
Any suggestions?