SQL Query Crafter — Compare Workflow¶
Description: Evaluate multiple approaches or versions
When to Use¶
Use the compare workflow when you need to evaluate multiple approaches or versions.
Input Requirements¶
- Table schema definitions and data dictionaries
- Query requirements and business logic specifications
- Performance baselines and SLA targets
- Existing query libraries and reusable patterns
Process¶
- Initialize — Set up the compare context for SQL Query Crafter
- Execute — Perform the compare operation following SQL Query Crafter's style
- Validate — Check output against quality gates
- Handoff — Deliver results to downstream personas
Output¶
- Optimized SQL files with named CTEs and inline documentation
- Parameterized query templates with bind variable placeholders
- EXPLAIN plan analysis with cost annotations
- Test harness scripts validating correctness and performance
Quality Gates¶
- No SELECT * on tables exceeding defined row thresholds
- No hardcoded literal values in WHERE clauses
- CTE decomposition required for queries with more than two joins
- No exposure of personally identifiable information in query results
- No ambiguous or implicit join conditions