cockroachdb / cockroachdb/cockroach
sql: collect statistics on arbitrary scalar expressions
Open
A-sql-table-stats
C-enhancement
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Now that we collect and use table statistics on virtual computed columns, we could extend that work to allow collection of table statistics on arbitrary scalar expressions. This would require some changes but is definitely within reach after https://github.com/cockroachdb/cockroach/pull/120875.
(Note that this is similar to, but different from https://github.com/cockroachdb/cockroach/issues/93998. That issue is about _selection_ before statistics collection, and this issue is about _projection_ before statistics collection.)
Jira issue: CRDB-37101
Contributor guide
Assessment
This issue has not been assessed yet.