-
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
How To Raise Your Profile Within The Salesforce Ecosystem
Raising your profile is not about showing off. It’s more about building your confidence, and letting people know that you are the GoTo perosn so…
Exception Handling in Salesforce
Exception: "An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions." Don’t forget…
Salesforce Service Cloud Handbook: Field Service Lightning, Omni-Channel Support, Einstein Bots, and more
In the previous article about Service Cloud, we covered its basic and most common functionality. Now, in our Salesforce Service Cloud Handbook, let's take a…
Popular Salesforce Videos
Manage Packages & Post Installation Script | Salesforce Managed Packages
This video will give you a brief overview of Managed Packages and Unmanaged Packages in Salesforce. You will get a quick glance at how to…
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…
How To Build a Kanban View Using LWC without APEX | Real-Time Project in LWC | Salesforce
In this project, you will learn 60% of the LWC. You gonna learn the following topics 1. How to create a lightning Page 2. How…