Use helper queries to identify queries and rules that may contain expensive logic, such as OR, NOT, or NOT IN. These results can help prioritize review when auditing query and rule performance.
📝 Note
The helper queries identify items for review. A result does not automatically mean that the query or rule is incorrect, only that the logic may deserve closer inspection.
Try a Slate example 💼
Copy this Suitcase ID and paste it in Database → Suitcase Import to import the helper queries:
0fe2d369-3341-4e17-952d-6775ce31aae4:slate-examples⭐ Get Inspired
This article was adapted from a post by Technolutions staff in the Slate Community Forums' Get Inspired space. Have a great idea for a Get Inspired post? Let us know!
Included helper queries
Rules Using OR or NOT Operators
This query uses the Configurable Joins Rule base and Custom SQL to identify rules that contain OR or NOT operators. Use the results to find rules that may benefit from a logic review or a more efficient structure.
Query Efficiency Auditor
This query uses Custom SQL to identify queries that include logic such as OR, NOT, or NOT IN. It can also identify queries based on larger tables, such as Message, Ping, or Source, where inefficient logic may have a larger performance impact.
Review the results
Run the helper query.
Open each returned query or rule.
Review the filter logic, base, joins, and exports.
Look for opportunities to replace negative logic with positive logic, split large queries into smaller queries, or narrow the population earlier in the query.
Test any revised query or rule before replacing the original configuration.
⭐ Best practice
Use these queries as part of a periodic performance review, especially before major cycle milestones when rules, portals, and recurring exports receive heavier use.