You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql: support partial stats at extremes without specifying columns
This commit adds support to collect partial statistics at extremes
without specifying a column, such as:
`CREATE STATISTICS my_stat FROM t USING EXTREMES`
This will collect partial stats on a default set of columns, which
are all single columns that are prefixes of forward indexes, excluding
partial, sharded, and implicitly partitioned indexes.
Modifies create stats job progress reporting to work when multiple
indexes will be scanned as part of the stat collection. The i'th index
scan will only report progress between `(i-1)/numIndexes`% and
`i/numIndexes`%. For example, if we expect to scan 4 indexes, each index
will report progress between 0%-25%, 25%-50%, 50%-75%, and 75%-100%
respectively. Also changes the `rowsExpected` count used by the
SampleAggregator and sample size computation to be the estimated number
of stale rows computed as `estimated row count * fraction of stale
rows` for partial stat collections.
Closes: #127832
Release note (sql): Partial stats at extremes can now be collected on
all valid columns of a table using the `CREATE STATISTICS <stat_name>`
`FROM <table_name> USING EXTREMES` syntax, without an `ON <col_name>`
clause. Valid columns are all single column prefixes of a forward index
excluding partial, sharded, and implicitly partitioned indexes.
0 commit comments