With Process Builder, using an action to update records which are related to the current record, depending on how you set your criteria, the Process might time out in getting the list of records. This can also happen when you use a Fast Lookup element in a Flow.
For example, a Process Builder on Lead records may be configured to update all related Activities where the criteria is set to "Closed Does not equal Boolean True". When multiple Leads are mass-updated from a list view, the Process runs a combined SOQL query for all activities across all selected Leads, which can cause a query timeout.
The resulting timeout happens because the criteria is non-selective. For more information, refer to the Salesforce Engineering blog on query performance: Maximizing the Performance of Force.com SOQL, Reports, and List Views
Instead of using "Does Not Equal True", change the criteria to "Closed Equals Boolean False". This makes the SOQL query selective (uses an index), which prevents the timeout.
Non-selective queries scan a large number of records instead of using indexed fields, which increases execution time and can lead to timeouts—especially during bulk operations such as mass updates. By using selective filters (like equality conditions on indexed fields), Salesforce can retrieve records more efficiently and avoid performance issues.
000383910

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.