多次执行 analyze table partition 是否都这么慢,可以在 v7.5 试一下
这个问题对应的 issue ANALYZE TABLE execution time depending on number of partitions · Issue #35142 · pingcap/tidb · GitHub 可以看最后的 revise pr
- statistics: support merge global topn in concurrency by Yisaer · Pull Request #38358 · pingcap/tidb · GitHub 增加了 https://docs.pingcap.com/zh/tidb/stable/system-variables#tidb_merge_partition_stats_concurrency
- executor: support save partition stats in concurrency by Yisaer · Pull Request #38239 · pingcap/tidb · GitHub 增加了 https://docs.pingcap.com/zh/tidb/stable/system-variables#tidb_analyze_partition_concurrency