cockroachdb / cockroachdb/cockroach

opt, sql: support PlanGram matching in FK cascades

Open
#172,275 1 comment 0 reactions 0 assignees View on GitHub
A-plan-management A-statement-hint C-enhancement T-sql-queries
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.