cockroachdb / cockroachdb/cockroach
opt, sql: support PlanGram matching in FK cascades
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
FK cascades are planned and run after the main query as postqueries. We should provide a way to control FK cascade plans using PlanGram matching.
Some ideas on how to implement this:
- we could add a dummy expression to the PlanGram language to indicate which part of the PlanGram is a FK cascade
- or have a separate statement hint type for FK cascades
- or add another field to the pin plan statement hint protobuf for FK cascade PlanGram(s)
Jira issue: CRDB-65487
Epic: CRDB-66266
Contributor guide
Research direction
Start by tracing the existing PlanGram matching and pin plan statement hint handling for FK cascade postqueries. Compare the proposed dummy expression, separate hint type, and protobuf field approaches; done means one supported way to match and control FK cascade plans.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100