1

I am trying to understand more about "SOQL Query Performance" topic and I'm reading all the Salesforce docs.

I have a doubt when we have a WHERE clause with an AND condition.

The two docs on this topic are:

Make SOQL query selective

Query & Search Optimization Cheat Sheet

In the first document, we can read:

fieldExpression1 AND fieldExpression2 - shows 2 simple filters

but in the second one, there is a more detailed analysis of the AND condition and it is called composite filter.

Is the first document too shallow? Thanks

  • Nothing prevents both assessments from being correct. You do have two simple filters, and they make up a composite once joined by AND. – Adrian Larson Apr 8 '19 at 11:10
2

Is the first document too shallow?

No.

First document states overall guidance on how to make SOQL query selective and provides few important points.

It also provides following materials to fully understand how standard and custom indexes are different, and how they're employed.

  • Working with very large SOQL queries
  • Webinar: Inside the Force.com Query Optimizer
  • Database Query & Search Optimization Cheat Sheet
  • Force.com Query Optimizer FAQ
  • Maximizing the performance of Force.com SOQL, reports and list views
  • Force.com SOQL Best Practices: nulls and formula fields
  • Force.com SOQL Performance Tips: LastModifiedDate vs SystemModStamp

You can see the 'Database Query & Search Optimization Cheat Sheet' is part of the first document those all the points in that pdf are not included.

| improve this answer | |
  • I agree with you. The first document provides few important points but regarding the AND condition it provides different/wrong information. Isn't it? Thanks – vt89 Apr 5 '19 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.