cockroachdb / cockroachdb/cockroach
sql: add support for Partial Statistics Collection [MAIN ISSUE]
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
This is the main issue for Epic CRDB-19449 -- implementing partial statistics collection. Linked here are the related issues and PRs for this feature
- Add a partial statistics predicate column to `system.table_statistics` to indicate that a statistic collected is partial. Related PRs:
* https://github.com/cockroachdb/cockroach/pull/91248
* https://github.com/cockroachdb/cockroach/pull/91759
* https://github.com/cockroachdb/cockroach/pull/92419
- Support collecting and adding partial table statistics at the extreme values of columns. Related PRs:
* https://github.com/cockroachdb/cockroach/pull/91228
* https://github.com/cockroachdb/cockroach/pull/92617
- Merge the partial and full statistics and store them in the statistics cache. This is when they can be used by the optimizer. Related PR:
* https://github.com/cockroachdb/cockroach/pull/91933
- Meta issue for making partial stats production-ready and enabling it by default (disabled in https://github.com/cockroachdb/cockroach/pull/98500)
* https://github.com/cockroachdb/cockroach/issues/125950
- Collect partial statistics at extremes automatically. Related PR:
* https://github.com/cockroachdb/cockroach/pull/93067
* Depends on supporting partial statistics at extremes without specifying columns
* https://github.com/cockroachdb/cockroach/issues/127832
- Other misc. issues:
* https://github.com/cockroachdb/cockroach/issues/128904
* https://github.com/cockroachdb/cockroach/issues/128725
- Support multi-column partial statistics USING EXTREMES
* https://github.com/cockroachdb/cockroach/issues/94076
- Collect partial statistics on arbitrary ranges using a WHERE expression
* https://github.com/cockroachdb/cockroach/issues/93998
- Statement bundles should include partial statistics
* https://github.com/cockroachdb/cockroach/issues/94101
Contributor guide
Assessment
This issue has not been assessed yet.