Rule Efficiency
  • 16 Nov 2023
  • 1 minute read
  • Dark
  • PDF

Rule Efficiency

  • Dark
  • PDF

Article Summary

If you notice a drop in performance as your database grows in record volume and complexity, consider trimming and honing existing rules. Follow these best practices for writing efficient rules:

Best Practices

  1. OR - Avoid OR statements. Instead, opt for multiple simple rules.

  2. NOT - Write rules in the affirmative. Avoid using NOT statements whenever possible.

  3. Character Search - Avoid filters that must perform a character searchFor example, School In List, Last Name Contains.

  4. CEEB - Instead of filtering on School In List (CEEB), try the more efficient geomarket.

  5. Source Format & Mailing Sent, Ping - Avoid filtering on Source Format, Mailing Sent, or Ping Data. The tables for Source Format, Mailing, and Ping will grow almost exponentially over the life of your database, and filters searching across those tables will see a marked decrease in performance over time.

  6. Do Nothing - By incorporating Do Nothing rules into Exclusivity Groups, you can prevent unnecessary records from being evaluated by your rules whenever possible. If the "Do Nothing" criteria would require many OR statements to define, this might be replaced by a set of streamlined Do Nothing rules preceding the rest of the action rules in this group. 

  7. Daisy Chain - Do not daisy chain rules. A rule cannot rely on the result of another rule.

  8. Outdated Filters - Check for any outdated or no longer necessary filters. If a rule is filtering by date, it may no longer be necessary as no one could reasonably meet that criteria, and thus the rule should be inactivated. If you have not already, update your rules to use configurable join bases

Get a Sense for a Rule's Speed

You can use the below method to explore changes to rules you've been considering quickly and get a good sense of whether those changes would result in a faster rule that can consistently beat timeout.

  1. In a rule, select New Query from the right navigation.

  2. Select Check Logic from the right navigation.

  3. In the Search Records... field, enter the name of a test record and select it.

  4. Observe how long it takes for the filters to run. This duration would be the amount of time it takes for the Matching Rows count preview to render in a query.

  5. Click Close. You can adjust the filters according to the best practices described above.

  6. Repeat this process and observe whether the rule executes more efficiently than before.

Was this article helpful?