function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AbAb 

System.QueryException: Non selective query againt error

Hello,

I have below error for a query,
System.QueryException: Non selective query againt large object type more thatn 200000
for this query
List<User> userList = [SELECT LDAPId__c FROM User WHERE TECH_LDAPId__c=: sLDAPId AND LDAPID__c != null AND IsActive=true];
how can i resovleve this, please
 
Best Answer chosen by Ab
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sandrine,

Please find the below artcile which shows the details why you face the error and also the suppose resolution for the same.

https://help.salesforce.com/s/articleView?id=000323572&type=1 (https://help.salesforce.com/s/articleView?id=000323572&type=1)

If this solution helps, Please mark it as best answer.

Thanks,