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
svdsvd 

Non-Selective Query error though queried using Indexed field.

Hi ,

 

I'm getting  " Non-selective query against large object type (more than 100000 rows) " error thought I used an external id in my WHERE clause.

 

Here is psuedo of my query.

 

TestObject tst = [select id,Name from TestObject where Name = 'Unique Name' and Ext_Num__c != null  ] 

 

Ext_Num__c is a external id for my TestObject. And my testObject has more than 100k records.

 

Why is this failing though I filtered my query ?

 

Thanks in advance for your time and help.

 

Thanks,

SVD