-
Non-selective query against large object type (more than 100000 rows)
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)The above error occurs in production where we have approx 138000 records. We have couple of methods to get this rectified like optimizing the query, null check, making the field external id or unique. Somehow the query Threshold value goes out of the limit that is why the query is not selective. Any help would be appreciated.
Log In to reply.
Popular Salesforce Blogs
Protect your Data with Data Classification in Salesforce
Happy Cybersecurity Awareness Month (CSAM)! Did you know that the loss of critical, and often sensitive, information can severely impact the profitability and innovation of your…
What is Enhanced Domain Deployment in Salesforce in 2023?
The next edition of My Domain is enhanced domains. With enhanced domains, all URLs in your organization, including those for your Experience Cloud sites, Salesforce…
Popular Salesforce Videos
Lightning Notifications Library | How and When to Use it in Salesforce? | Toast | Notice
In this video, you will learn about Lightning Notifications Library. We have two types of notifications available in it. 1. Toast 2. Notice In the…
Salesforce Flow to Create Feedback form on Case | How to use Slider, Radio button on Screen Flow
Use Case: In this video, we are creating a screen flow to get feedback from the users when the case is closed. Learnings: 1. How…
What is Billing - Salesforce Revenue Cloud
How can you transform your billing system for subscription and usage models? By dropping your legacy systems and streamlining your processes. In this video, learn…