statistics: deprecate stats v1 in 8.5 docs#21476
statistics: deprecate stats v1 in 8.5 docs#21476qiancai wants to merge 9 commits intopingcap:release-8.5from
Conversation
Synced from: pingcap/docs#22624 Target PR: pingcap#21476 AI Provider: gemini Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6fe87f9 to
0c164d8
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…s-cn into poe-patch-stats-v1-8.5-22624
|
/cc @0xPoe |
|
@0xPoe: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| 建议所有表、索引和分区使用相同的统计信息版本。如果你的集群仍在使用统计信息版本 1,请尽快迁移至统计信息版本 2。在为某个对象(例如表、索引或分区)收集到 Version 2 的统计信息之前,TiDB 会继续使用该对象现有的 Version 1 统计信息。 | ||
|
|
||
| 切换版本的正当理由可能包括:使用 Version 1 在收集 Count-Min Sketch 统计信息时,由于哈希冲突导致等值查询或 `IN` 查询谓词估算不准确。此时,你可以参考 [Count-Min Sketch](#count-min-sketch) 小节中描述的解决方案,或者设置 `tidb_analyze_version = 2` 并对所有对象重新运行 `ANALYZE`。在 Version 2 的早期阶段,执行 `ANALYZE` 后有内存溢出的风险,现在这个问题已经解决,但最初的解决方案是设置 `tidb_analyze_version = 1` 并对所有对象重新运行 `ANALYZE`。 | ||
| 迁移的一个主要原因是,版本 1 可能对等值/IN 谓词产生不准确的估算,因为 Count-Min sketch 可能存在哈希冲突。更多信息,请参阅 [Count-Min Sketch](#count-min-sketch)。为避免此问题,请设置 `tidb_analyze_version = 2` 并对所有对象重新运行 `ANALYZE`。 |
There was a problem hiding this comment.
| 迁移的一个主要原因是,版本 1 可能对等值/IN 谓词产生不准确的估算,因为 Count-Min sketch 可能存在哈希冲突。更多信息,请参阅 [Count-Min Sketch](#count-min-sketch)。为避免此问题,请设置 `tidb_analyze_version = 2` 并对所有对象重新运行 `ANALYZE`。 | |
| 迁移的一个主要原因是,版本 1 可能对等值/IN 谓词产生不准确的估算,因为 Count-Min Sketch 可能存在哈希冲突。更多信息,请参阅 [Count-Min Sketch](#count-min-sketch)。为避免此问题,请设置 `tidb_analyze_version = 2` 并对所有对象重新运行 `ANALYZE`。 |
[LGTM Timeline notifier]Timeline:
|
What is changed, added or deleted? (Required)
Document that Statistics Version 1 (
tidb_analyze_version = 1) is deprecated and will be removed in a future release across the statistics, ANALYZE, and analyze status docs. Align the migration query examples with v1 -> v2 migration.Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?