cockroachdb / cockroachdb/cockroach

sql: ability to export and import external statement hints

Open
#172,619 0 comments 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

We currently backup and restore the external statement hints created by these plan management builtin functions:

- `information_schema.crdb_rewrite_inline_hints`
- `information_schema.crdb_set_session_variable_hint`
- `information_schema.crdb_pin_plan_gist`
- `information_schema.crdb_pin_plan_gram`

But we do not have a way to export or import the external statement hints to move them between clusters. We should add a way to do this so that statement hints created on testing clusters can be applied to production clusters.

Jira issue: CRDB-65866

Epic: CRDB-66266

Contributor guide

Open the contributing guide

Research direction

Start by examining the existing backup and restore handling for external statement hints created by the four listed information_schema functions. Determine how an export/import path could move those hints between clusters, including from testing to production. Done means externally created hints can be exported from one cluster and imported into another.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.