Skip to content

Perf: add opt-in project-index planning - #6002

Draft
fresioAS wants to merge 6 commits into
SQLMesh:mainfrom
fresioAS:plan-dedup-snapshot-state-read
Draft

Perf: add opt-in project-index planning#6002
fresioAS wants to merge 6 commits into
SQLMesh:mainfrom
fresioAS:plan-dedup-snapshot-state-read

Conversation

@fresioAS

Copy link
Copy Markdown
Contributor

Description

Adds opt-in project-index planning through --use-project-index and the new plan.use_project_index configuration option.
When enabled, planning:

  • Refreshes the persistent project index.
  • Reuses snapshots already loaded from state to avoid duplicate reads.
  • Scopes plan DAG work to changed or selected model lineage.
  • Preserves the resulting plan and existing default behavior.

Test Plan

Still waiting to test in live env - will update

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

fresioAS and others added 6 commits August 27, 2026 22:32
Signed-off-by: Andreas Fredhøi <andreas.fredhoi@fresio.no>
Signed-off-by: Andreas Fredhøi <andreas.fredhoi@fresio.no>
Add --use-project-index to sqlmesh plan while preserving the original full-DAG and state-read path by default. The opt-in keeps ContextDiff complete but scopes PlanBuilder graph, deployability, and interval work to changed or selected lineage and reuses snapshots already hydrated from state.

A full plan still loads all local models to discover changes; the project index is created or refreshed for subsequent targeted lint and render commands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Andreas Fredhøi <andreas.fredhoi@fresio.no>
Signed-off-by: Andreas Fredhøi <andreas.fredhoi@fresio.no>
Signed-off-by: Andreas Fredhøi <andreas.fredhoi@fresio.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant