-
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 for Logistics Industry | All You Need to Know
The logistics industry has evolved from just stock-keeping to maintaining a large amount of inventory management and handling of that inventory with Unique IDs related…
Salesforce Lead Management: Tips And Best Practices
Customer relationship is a very important business segment. We will tell you about such a quality tool as Salesforce. Make Your Feedback Perfect - Salesforce…
How To Leverage The Power of Salesforce For Manufacturing?
Manufacturing industries are facing immense pressure to modernize operations and reinvent themselves. Gaining visibility into key customer metrics, a streamlined collaboration between disparate departments, and…
Popular Salesforce Videos
How to Become Salesforce Developer in 2022 | Salesforce Career Path
Anyone can become a Salesforce developer. It takes to learn Salesforce-specific developer skill sets and does not account for time spent in formal education or…
Design Patterns and Best Practices to Build Reusable Lightning Web Components | Salesforce Tutorial
LWC Best Practices & Design Pattern Component Architecture and Composition Styling Reusable components Sharing components between LWC and LWC OSS Packaging LWC and LWC OSS…
How Salesforce Supports Veterans in the Workplace
Have you found community at your workplace? Tune in as Brian Kim, Account Executive, shares how Salesforce supports veterans in the workplace through Vetforce, our…