-
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
Salesforce vs Zoho CRM - Make a Decision with this Comprehensive Comparison
Is Salesforce or Zoho CRM a better fit for your company? We're here to assist you in making a decision with our comprehensive comparison of…
Top 10 Highlights of Dreamforce 2019
Hi, all Salesforce lovers! I know that every one of you would have wanted to be part of the Dreamforce ’19, the event of all…
Salesforce PDO Partner Program 2021: A Guide
Salesforce AppExchange has been a huge hit across its 15-year lifespan and is the key differentiator for Salesforce when it comes to the global CRM…
Popular Salesforce Videos
Product Rule Vs Price Rule Salesforce CPQ
Product Rule CPQ product rules help ensure sales reps are putting together the right products and bundles every single time. You don’t have to worry…
Practice Test and Questions for Salesforce Platform App Builder Certification Exam
In this video, Shrey provides a practice test for the candidates who are preparing for the Salesforce Platform App Builder Exam. This test boosts your…
Build Your First Salesforce IoT Project in 20 Minutes
Join us to see how you can build your first Salesforce IoT orchestration in less than 20 minutes! You will learn a quick overview of…