Non-selective queries in DataRaptors
The last OmniStudio anti-pattern we will review in this chapter traces back to the non-selective query issues we looked at in Chapter 8, Non-Selective Queries and Data Skew. Let’s look at a few examples that show DataRaptors with potentially non-selective Filter criteria and their alternatives, along with their improved execution times.
Wildcards in Filter criteria
When a wildcard is used in the DataRaptor Filter criteria along with the LIKE
operator, the resulting SOQL query created by the DataRaptor will most likely become non-selective. This will negatively affect its performance and may also cause a query to time out as your data volume grows. The following is a sample DataRaptor that uses the LIKE
operator along with the %
wildcards that look for a substring value in the field (see Figure 12.13):
Figure 12.13 – An overview of the LIKE operator used in a DataRaptor Extract
In my test, this DataRaptor...