Activity Forums Salesforce® Discussions How to resolve error “Non-selective query against large object type” in Salesforce?

  • shariq

    Member
    September 22, 2018 at 9:41 pm

    Whenever an object has greater than 100K records any query on that object must be “selective”. For a query to be selective it must have enough indexed filters (where clauses) so that less than 10% of the records (in our example 10K) are returned before applying the limit statement.

  • Parul

    Member
    September 23, 2018 at 5:26 am

    If you're running a trigger on objects that have more than 200,000 records, it's possible that you'll receive the error, "System.QueryException: Non-selective query against large object type." We'll go over the a few possible fixes. Resolution.
    Options to resolve error.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos