cockroachdb / cockroachdb/cockroach

sql: stats forecasts can have too many histogram buckets

Open
#117,889 0 comments 0 reactions 0 assignees View on GitHub
A-sql-table-stats C-bug O-support P-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

See https://github.com/cockroachlabs/support/issues/2792

A few stats collections with <200 buckets produced 800+ buckets in the forecast. This adds additional work for the optimizer to scan and filter those buckets during optimization. Combining the buckets would alleviate some work for the optimizer.

I attempted to created a test case [here](https://github.com/cockroachdb/cockroach/blob/fb972bc3b45866ded2eadd4dfbd83c1b3c276b8f/pkg/sql/stats/forecast_test.go#L29) to show as an example, but was unable to reproduce with a basic test case.

Jira issue: CRDB-35404

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.