Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
86078: sql/stats: generate statistics forecasts r=rytaft,yuzefovich a=michae2 **sql/stats: use nil eval.Context as CompareContext when forecasting** When forecasting table statistics, we don't need a full *eval.Context. We can simply use a nil *eval.Context as a tree.CompareContext. This means we don't have to plumb an eval.Context into the stats cache. Assists: #79872 Release note: None **sql/stats: generate statistics forecasts in the stats cache** As of this commit, we now try to generate statistics forecasts for every column of every table. This happens whenever statistics are loaded into or refreshed in the stats cache. We use only the forecasts that fit the historical collected statistics very well, meaning we have high confidence in their accuracy. Fixes: #79872 Release note (performance improvement): Enable table statistics forecasts, which predict future statistics based on historical collected statistics. Forecasts help the optimizer produce better plans for queries that read data modified after the latest statistics collection. We use only the forecasts that fit the historical collected statistics very well, meaning we have high confidence in their accuracy. Forecasts can be viewed using `SHOW STATISTICS FOR TABLE ... WITH FORECAST`. **sql: show forecasted stats time in EXPLAIN** When using statistics forecasts, add the forecast time (which could be in the future) to EXPLAIN output. This both indicates that forecasts are in use, and gives us an idea of how up-to-date / ahead they are. Assists: #79872 Release note: None **sql/opt: add tests for statistics forecasts** Add a few simple testcases for usage of statistics forecasts by the optimizer. Assists: #79872 Release note: None --- Release justification: Enable feature before we get too far into stability period. 86137: sql: use DelRange with tombstone in `force_delete_table_data` r=ajwerner a=ajwerner Fixes #85754 Release justification: minor change needed to adopt MVCC bulk ops fully Release note: None 86160: colexecerror: do not annotate the context canceled error r=yuzefovich a=yuzefovich This commit makes it so that the context canceled error doesn't get annotated with an assertion failure when it doesn't have a valid PG code. This makes sure that the sentry issues don't get filed for the context canceled errors - they are expected to occur. Fixes: #82947 Release note: None Release justification: bug fix. 86164: sql: deflake TestRoleOptionsMigration15000User r=ajwerner a=RichardJCai Previously it was flakey because we always assumed the first user created had ID 100, however this is not the case due to transaction failures. Release note: None Release justification: test only 86173: opt: fix error due to unsupported comparison for partitioned secondary index r=rytaft a=rytaft This commit fixes a bug where we were attempting to find the locality of the partitions in a secondary index, but we passed the incorrect index ordinal to the function `IndexPartitionLocality`. Fixes #86168 Release justification: Category 3: Fixes for high-priority or high-severity bugs in existing functionality Release note (bug fix): Fixed a bug that existed on v22.1.0-v22.1.5, where attempting to select data from a table that had different partitioning columns used for the primary and secondary indexes could cause an error. This occured if the primary index had zone configurations applied to the index partitions with different regions for different partitions, and the secondary index had a different column type than the primary index for its partitioning column(s). Co-authored-by: Michael Erickson <[email protected]> Co-authored-by: Andrew Werner <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: richardjcai <[email protected]> Co-authored-by: Rebecca Taft <[email protected]>
- Loading branch information