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
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_statisticsto indicate that a statistic collected is partial. Related PRs:system.table_statistics#91248Support collecting and adding partial table statistics at the extreme values of columns. Related PRs:
USING EXTREMEStosystem.table_statistics#91228Merge the partial and full statistics and store them in the statistics cache. This is when they can be used by the optimizer. Related PR:
Meta issue for making partial stats production-ready and enabling it by default (disabled in sql: disallow creating partial stats by default #98500)
Collect partial statistics at extremes automatically. Related PR:
Other misc. issues:
Support multi-column partial statistics USING EXTREMES
Collect partial statistics on arbitrary ranges using a WHERE expression
Statement bundles should include partial statistics