cockroachdb / cockroachdb/cockroach

sql: show non-default settings that could change plans in EXPLAIN

Open
#130,347 0 comments 0 reactions 1 assignee Claimed by @nkodali View on GitHub
C-enhancement O-support P-3 T-observability
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Given a slow query plan, it can be difficult to identify whether a setting change might be the cause for the poor plan. This information is only shown in a statement bundle, and requires explicitly searching through the `env.sql` file to identify relevant settings.

We should consider augmenting the `EXPLAIN` output with any modified settings that might affect planning. The list of settings in the `Memo` staleness check are good candidates: https://github.com/cockroachdb/cockroach/blob/60313dca26e21509dd0e6e80f23fda934da93424/pkg/sql/opt/memo/memo.go#L401
We may want to restrict this output only to verbose `EXPLAIN`, since a list of changed settings on every `EXPLAIN` output could become annoying.

Jira issue: CRDB-42010

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.