cockroachdb / cockroachdb/cockroach
sql: show non-default settings that could change plans in EXPLAIN
- 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
Assessment
This issue has not been assessed yet.