Print this page

Does order of the WHERE conditions makes a difference to SOQL performance?

Knowledge Article Number 000175179
Description How does the order of the filters in the WHERE condition affect a SOQL query?  For example if you have an indexed field as part of their WHERE condition, will performance benefit if the index is used at the start of the Where condition?
Resolution The ordering in the WHERE clause does not matter. The SFDC Optimizer evaluate all filters to look for the indexed and most selective one.

promote demote