Non-selective query against large object type (more than 200000 rows)
Case Merge Premium end users may experience this error when attempting to update cases from a Visualforce page in the Service Cloud Console.
Email to Case Premium end users will not normally encounter this error directly, however this error can occur upon attempting to process inbound messages through the Email to Case Premium packaged email service.
Case Merge Premium:
Each time a case is created or updated, Case Merge Premium will run a query to search for duplicate cases.
This error likely indicates that based on the duplicate criteria you have specified in the setup wizard, the query is looking through over 200,000 cases and was not selective enough based on Salesforce's standards. As the next step in troubleshooting this, please review your duplicate criteria to ensure that it is using at least 2 parts of criteria, one of which is excluding closed cases.
For additional information on query selectivity, please review the following Salesforce knowledge article.
Email to Case Premium:
Each time a case is created or updated, Email to Case Premium may attempt to perform one or both of the following actions:
1. Account Lookup under the Auto-Add New Contacts feature.
2. Search Custom Email Fields under the Inbound General Settings.
Both of these feature require running search queries, and if the number of records these queries have to go through exceed 200,000, this error may be thrown.
For users of the Account Lookup feature, unfortunately there isn't a great workaround other than to disable the setting. With the setting disabled, newly created Contacts will be added to the Default Account defined in the Email to Case Premium settings.
For users of the Search Custom Email Fields feature, you may be able to address this error by marking your custom email fields as External Ids which will automatically index the fields. Just to note, organizations are limited to 7 External Ids per object. See Salesforce documentation on Custom Field Attributes for more information.