change the way of checking auto analyze ratio #24237
Labels
component/statistics
sig/planner
SIG: Planner
type/enhancement
The issue or PR belongs to an enhancement.
Development Task
Currently, we use
(modify_count / count) > autoAnalyzeRatio
as the check for auto analyze, this may lead to confusing results sometimes.For example, if the table has 200 rows, then a 200-row insert can trigger auto analyze if the
autoAnalyzeRatio
is0.5
, while a 67-row delete can trigger it as well. This inconsistency should be confusing.To solve this problem, we can use
(modify_count / hist.TotalRowCount()) > autoAnalyzeRatio
as the check instead.The text was updated successfully, but these errors were encountered: