Nonselective query against large object type (more than 100000 rows).

Upsert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: execution of AfterInsert caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)


An unexpected error has occurred. Your development organization has been notified.

 

 

考虑下在select的时候,有没有contains null

原文地址:https://www.cnblogs.com/yqskj/p/2745127.html