Skip to content

docs: ASAPPlanner memo-based joint optimization with MILP - #776

Merged
zzylol merged 53 commits into
mainfrom
docs/joint-planning-search
Oct 24, 2026
Merged

zzylol merged 53 commits into
mainfrom
docs/joint-planning-search

Conversation

@zzylol

@zzylol zzylol commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

ASAP primitives expand the search space and create cross-query cost dependencies. This proposal explains compact candidate generation and joint cost-based selection.

What

Adds a concise memo/MILP design and a separate window/materialization proposal. The main document uses connected explanatory prose and design rationale, with traditional memo rule examples followed by P95/P99 through ASAPPlanner stages. It cites Graefe’s Cascades paper and distinguishes demand-driven exploration from separate exhaustive phases.

The proposed representation has groups and physical candidates. Multiple candidates from one group may be selected; consumers connect directly to selected candidates. Shared state is represented by memo groups, without separate physical-instance slots. Distinct execution scopes or incompatible input bindings require distinct generated candidates.

The MILP defines candidate selection, compatible connections, query coverage, dependency support, acyclicity, and cost/accuracy/resource requirements. Optimality is restricted to the generated inventory and configured models. Proposed behavior is distinguished from existing implementation.

Key code interfaces added / modified

None (documentation only).

Before this PR

No unified proposal connecting memo expansion, ASAP-aware shared state, window/materialization choices, and joint selection.

After this PR

P95 and P99 remain separate result groups and can connect to one shared KLL candidate. Several KLL configurations may also be selected for different consumers. The design explains this with examples and a compact MILP formulation.

Verification

  • git diff --check passed.
  • Checked section numbering, Variables/Constraints subsections, local links, code fences, and candidate terminology.
  • Main document is approximately 2,500 words, with examples preceding the formal model.
  • Documentation only; no runtime tests run.

@zzylol zzylol added documentation Improvements or additions to documentation optimizer Workload optimization and plan selection search Candidate-plan search space and algorithms labels Oct 20, 2026
@zzylol zzylol changed the title docs: design joint planning search with exact pruning docs: design joint search with exact pruning conditions and heuristic fallbacks Oct 20, 2026
@zzylol zzylol changed the title docs: design joint search with exact pruning conditions and heuristic fallbacks docs: design exact pruning for joint planning search Oct 20, 2026
@zzylol zzylol changed the title docs: design exact pruning for joint planning search docs: memo group and MILP design for joint planning Oct 23, 2026
zzylol added 28 commits October 23, 2026 23:16
@zzylol
zzylol merged commit a0d0eb8 into main Oct 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation optimizer Workload optimization and plan selection search Candidate-plan search space and algorithms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant