go-mysql-server
go-mysql-server copied to clipboard
[stats] Use floats for stats counters, limit MCVs to distribution outliers
Three main changes:
- stats use floats by default, to avoid uint->float round tripping
- bucket MCVs are assumed to be sorted
- MCVs are discarded if they are not at least twice as frequent as the average bucket frequency. The 2x number is arbitrary, but the motivation is that MCVs are expensive and they need to justify their cost by actually being outliers.
Additional work is required for integration with Dolt. Additional work is required for integration with DoltgreSQL.