My SFMC SQL Operating Rules
A compact checklist before a query becomes production infrastructure.
Evidence tier describes my hands-on relationship with the content. Official sources describe platform contracts/documentation. Production observations should not automatically be treated as official limits.
These are the defaults I want to remember before promoting a query from exploration into a production automation.
Explicit columns, explicit grain, explicit target action.
Filter early; do not wrap large filter columns unnecessarily.
Know the business identity before deduplicating.
Pre-aggregate event sources before cross-joining behavior.
Avoid giant multi-purpose queries; stage when it improves clarity or runtime.
Treat 10+ minute recurring runtime as a design smell.
Document source, target, schedule and business owner.
Re-save Query Activities after relevant source/target schema changes.
The 30-minute wall is not a performance target
Salesforce enforces a 30-minute hard limit and recommends reducing scope so queries finish well below it. Current guidance also flags consistently long queries as candidates for a different transformation strategy.
Schema changes can create stale behavior
Salesforce documented in 2026 that validated Query Activity logic is cached; after source/target schema or primary-key changes, re-saving the Query Activity refreshes that validated query definition.