【 TiDB 使用环境】生产环境
【 TiDB 版本】7.1.3
【遇到的问题:问题现象及影响】
[2025/02/21 14:21:50.861 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=899166] [hist_id=61] [is_index=false]
[2025/02/21 14:21:50.861 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=1220993] [hist_id=22] [is_index=false]
[2025/02/21 14:21:50.863 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=899254] [hist_id=61] [is_index=false]
[2025/02/21 14:21:50.980 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=194224] [hist_id=58] [is_index=false]
[2025/02/21 14:21:51.017 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=899256] [hist_id=61] [is_index=false]
[2025/02/21 14:21:51.165 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=899166] [hist_id=61] [is_index=false]
[2025/02/21 14:21:51.165 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=1220993] [hist_id=22] [is_index=false]
[2025/02/21 14:21:51.166 +08:00] [ERROR] [handle_hist.go:365] [“fail to get stats version for this histogram”] [table_id=899254] [hist_id=61] [is_index=false]
tidb实例一直报这个日志,不知道怎么处理比较好,
然后有部分的table_id 查不出来是哪张表,有点奇怪,不知道咋解决问题
已知问题了,升级版本可以修复。
sync load cannot stop to retry when to load empty stats · Issue #52657 · pingcap/tidb (github.com)
2 个赞
1 个赞
如果不升级有什么影响呢?数据库的运行速度会变慢吗
除了升级,有没别的解决方法?
没影响,就是日志写太多了
1 个赞
会影响数据查询的准确性,这个错误是采集和统计相关的内容
那所有的查询数据会依赖于这个采样的分析结果,进行cbo (成本优化),因为采样结果有问题,会导致优化失效。SQL 运行就容易出现 slow query…
建议升级,这种问题直接修复就好了
1 个赞
建议升级版本试试
统计报错都是bug,需要升级版本更新解决
这是个已知的bug了,建议升级版本更新解决,不过不升级主要是导致日志文件增大,也不会有其它影响,需要根据实际情况权衡升级与否了。
如上面所说的应该是 bug,最好是升级。
workaround :可以找出报错的 table_id 的 table,然后 analyze 一把。如果找不到,可能是 partition_id。
或者可以滚动重启 tidb应该也可以解决这个报错。
此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。