Skip to content

Perf: Render scope upstream snapshots - #5917

Draft
fresioAS wants to merge 2 commits into
SQLMesh:mainfrom
fresioAS:render-scope-upstream-snapshots
Draft

Perf: Render scope upstream snapshots#5917
fresioAS wants to merge 2 commits into
SQLMesh:mainfrom
fresioAS:render-scope-upstream-snapshots

Conversation

@fresioAS

@fresioAS fresioAS commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-on from #5913 - solves #5905

Adds an opt-in --use-project-index flag to sqlmesh render.
When enabled, SQLMesh loads only the target model and its upstream dependencies, reducing unnecessary project loading and snapshot creation. It safely falls back to a full load if the project index is missing or stale.
Includes CLI documentation and tests for scoped loading and fallback behavior.

Test Plan

395 model live plan

=== Timing summary ===
sqlmesh --gateway core_dev_new render sap.exposed.project 24.98s ok
sqlmesh --gateway core_dev_new render sap.exposed.person 20.52s ok
sqlmesh --gateway core_dev_new render sap.exposed.calendar 18.99s ok
sqlmesh --gateway core_dev_new render --use-project-index sap.exposed.project 7.13s ok
sqlmesh --gateway core_dev_new render --use-project-index sap.exposed.person 5.91s ok
sqlmesh --gateway core_dev_new render --use-project-index sap.exposed.calendar 6.37s ok

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
fresioAS force-pushed the render-scope-upstream-snapshots branch from 4e386ea to 82a30cd Compare July 24, 2026 12:25
@fresioAS fresioAS changed the title Render scope upstream snapshots Jul 24, 2026
@fresioAS
fresioAS force-pushed the render-scope-upstream-snapshots branch from 82a30cd to 54a0685 Compare July 24, 2026 13:14
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

1 participant