-
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
Introduction and How to Use Postman | Salesforce Developer Guide
Introduction Postman is a computer application it is used for testing APIs (Application Programming Interfaces). Postman sends an HTTP request to the webserver and receives…
Why It’s Important To Learn Salesforce In 2021
Salesforce is a popular CRM solution, and that’s normal for all the benefits that it offers. It gives businesses a wide range of tools that…
All About Salesforce Health Check 101
If you are a Salesforce admin, your major worry must be security. You will be extra cautious as you are handling customer data and yes,…
Popular Salesforce Videos
How does Salesforce Field Service Platform increase servicing revenue for your company
CRM Salesforce, along with its Field Service Lightning App, is drastically improving the field-force productivity in the industry. Built on the Salesforce Service Cloud, it…
Salesforce Lightning Development Tutorial - Hello World!
Salesforce Lightning Custom Component Development Tutorial for Beginners - Let us implement our first custom lightning component - Hello World! Video Resource: Lightning Evangelist
What is Field Dependency in Salesforce and When to use it?
This video gives a complete knowledge of what Field Dependency is in Salesforce. It's divided this topic into 4 major points that are: 1. What…