-
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
Things You Need to Consider While Integrating WordPress and Salesforce
WordPress and Salesforce are no less than a match made in heaven. When you go for a WordPress Salesforce Integration (WordPress website with Salesforce as…
3 Top Challenges with Data Migration to Salesforce you Want to Avoid
Moving data to a new system, especially Salesforce, can be a daunting task. In this blog post, we'll delve into three issues that commonly arise…
Why Choose Salesforce CRM for the Hospitality Industry
Today, it's hard to imagine an industry with tougher competition than hospitality. Both small family-owned hotels and big-name international resort chains compete with each other…
Popular Salesforce Videos
Guided Setup with Salesforce Field Service Administration - Webinar Recording
Salesforce Field Service is a complete, end-to-end solution for customer service in the field. Salesforce Field Service brings together customers, employees, and products on a…
Summer '20 Release - Release Updates Page
Check out the new Release Updates Page. Salesforce Summer '20 is full of amazing features for #AwesomeAdmins! Check out what's new when you follow and…
Strategy Design Pattern in Salesforce | Video Tutorial
Design Patterns are very important for us to understand to develop an efficient apex code. Watch this video to learn all about it and do…