Skip to content

Commit

Permalink
docs: Disable auto_analyze for plan_replayer (#16880) (#16882)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Mar 25, 2024
1 parent b66aca5 commit b4dd2f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sql-plan-replayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ PLAN REPLAYER LOAD 'file_name';
PLAN REPLAYER LOAD 'plan_replayer.zip';
```

> **注意:**
>
> 你需要禁止 `auto analyze`,否则导入的统计信息会被 `analyze` 覆盖。
你可以通过将 [`tidb_enable_auto_analyze`](/system-variables.md#tidb_enable_auto_analyze-从-v610-版本开始引入) 系统变量设置为 `OFF` 来禁用 `auto analyze`

```sql
set @@global.tidb_enable_auto_analyze = OFF;
```

导入完毕后,该 TiDB 集群就载入了所需要的表结构、统计信息等其他影响构造 Plan 所需要的信息。你可以通过以下方式查看执行计划以及验证统计信息:

```sql
Expand Down

0 comments on commit b4dd2f8

Please sign in to comment.