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
{{ message }}
Repository navigation
planner: simplify visited table tracking in collect_column_stats_usage #67912
pkg/planner/core/rule/collect_column_stats_usage.go currently keeps both visitedPhysTblIDs and visitedtbls.
In collectPredicateColumnsForDataSource(), both are populated with the same table ID (ds.TableInfo.ID), while visitedPhysTblIDs is already collected unconditionally.
Proposal
reuse visitedPhysTblIDs for plan replayer table stats recording
remove the redundant visitedtbls field
clarify the visitedPhysTblIDs name/comment if needed, since the current code inserts table IDs rather than ds.PhysicalTableID
Benefit
Reduce duplicated state and make the collector easier to understand, with no intended behavior change.
Activity
pinkbit256 commentedon Apr 20, 2026
@0xPoe I'm working on this, thank you!
pkg/planner: remove redundant visited table state in stats usage coll…
pkg/planner: remove redundant visited table state in stats usage coll…