Total Pageviews

Sunday, March 22, 2015

Non-selective query against large object type (Issue)


In life many times simple things pose to be more nagging. Thinking of it why would salesforce be any different? In a age of "Lighting" , "Heroku" and "Mobility" there are minor things on the salesforce platform which might test our nerves. One such trifling issue is getting errors of non-selective query against large objects . We keep raking our heads why it keeps coming (as our memory is not always reliable that we had encountered it earlier too).

Error encountered : System.QueryException: Non-selective query against large object type (more than 100000 rows).
Lets ponder on this a bit!

What is a selective Query as against non-selective query?
A query is selective when one of the query filters is on an indexed field and the query filter reduces the resulting number of rows below a system-defined threshold. The performance of the SOQL query improves when two or more filters used in the WHERE clause meet the mentioned conditions.
What is Large Object Type?
Object having records in excess of 99999

Solutions
  • Consider an indexed filter
  • Contact salesforce.com about custom indexing.
One will need indexes for all of the fields one is using if SOQL . This means that fields in filter must all be marked as External ID or have custom indexes created.

Failing that, one may want to use SOSL, because the search indexer (not to be confused with a database index) will include all of the filter fields in the search.





9 comments:

  1. The information which you have provided is very good. It is very useful who is looking for salesforce Online Training Bangalore

    ReplyDelete
  2. Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
    digital marketing training in marathahalli

    digital marketing training in rajajinagar

    Digital Marketing Training in online


    full stack developer training in pune


    full stack developer training in annanagar

    ReplyDelete
  3. Well researched article and I appreciate this. The blog is subscribed and will see new topics soon.
    python training institute in chennai
    python training in chennai
    python training in chennai

    ReplyDelete
  4. Resources like the one you mentioned here will be very useful to me ! I will post a link to this page on my blog. I am sure my visitors will find that very useful
    Blueprism training in Pune

    Blueprism online training

    Blue Prism Training in Pune

    ReplyDelete
  5. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 
    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune

    ReplyDelete
  6. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..
    java training in omr | oracle training in chennai

    java training in annanagar | java training in chennai

    ReplyDelete
  7. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..


    angularjs Training in chennai
    angularjs-Training in pune

    angularjs-Training in chennai

    angularjs Training in chennai

    angularjs-Training in tambaram

    ReplyDelete
  8. Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.

    Best AWS Training in Chennai | Amazon Web Services Training in Chennai

    AWS Training in Chennai | AWS Training Institute in Chennai Velachery, Tambaram, OMR


    AWS Training in Chennai |Best Amazon Web Services Training in Chennai


    AWS Training in Velachery | Best AWS Course in Velachery,Chennai

    ReplyDelete
  9. You truly did more than visitors’ expectations. Thank you for rendering these helpful, trusted, edifying and also cool thoughts on the topic to Kate.
    iosh course in chennai

    ReplyDelete