-
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
Optimising Salesforce-Kakao for Cross-Border Sales Success
In the rapidly evolving realm of worldwide trade, companies are always searching for inventive approaches to surmount cross-border obstacles and propel revenue growth. This is…
Salesforce Starter Suite and Pro Suite
For small businesses, selecting and implementing a new customer relationship management (CRM) software can be a daunting task. Luckily, Salesforce offers their Starter and Pro…
Reimagining User Experience with Salesforce to Drive a Better Customer Experience
The end user delivering the service must be the first objective in the pursuit of a better customer experience. This is especially true for any…
Popular Salesforce Videos
Apex Design Patterns: The Singleton Pattern in Salesforce
The Singleton Pattern One Private variable of the class itself will hold the instance of the complete class so that we can access all the…
What is Salesforce | Salesforce CRM Tutorial For Beginners | Salesforce Training
This Salesforce Training Video will help you understand what is a CRM ( Customer Relationship Management ), why we need Salesforce CRM and how some…
Fireside Chat with Arundhati Bhattacharya, CEO Salesforce India
Meet the new Chairperson and CEO of Salesforce India Arundhati Bhattacharya. Tasked with further leading our growth and expansion throughout the country, Arundhati will be…