Skip to content

Commit

Permalink
stats: more conservative lower bound for downward-trending forecasts
Browse files Browse the repository at this point in the history
Instead of 0 as a lower bound for predictions, use 1/3 times the lowest
prior observation. This will avoid predicting zero rows for a statistic
unless we really observed zero rows somewhat recently.

Fixes: #119967

Release note (bug fix): Statistics forecasts of zero rows can cause bad
plans. This commit changes forecasting to avoid predicting zero rows for
most downward-trending statistics.
  • Loading branch information
michae2 committed Apr 26, 2024
1 parent 6e7ba17 commit 78557f1
Show file tree
Hide file tree
Showing 3 changed files with 553 additions and 12 deletions.
Loading

0 comments on commit 78557f1

Please sign in to comment.