dbt Analytics Engineering (50 Qs)•Part 3: Enterprise Scale, Performance & CI/CD Pipelines (Senior / Staff)
Performance Profiling in dbt: Diagnosing long compile times, circular references, and slow models.
senior LevelMost AskedFormsPerformancePipes
In Simple Words: Optimizing slow enterprise dbt projects:
- Compilation Delays: Excessively nested Jinja macros and thousands of model references slow down
dbt compile. Use--threads 16to parallelize compilation. - Circular References: Occurs when Model A refs Model B and Model B refs Model A. dbt's DAG compiler detects and flags circular loops during parsing.
- Audit Execution Timings: Inspect
target/run_results.jsonto sort models by execution duration and target the slowest 5% for incremental refactoring.