Skip to content

Commit f5e2118

Browse files
authored
tidb: add skip-init-stats config (#21766)
1 parent 42eb276 commit f5e2118

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tidb-configuration-file.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,16 @@ Configuration items related to performance.
637637
+ When the value of `force-init-stats` is `true`, TiDB needs to wait until statistics initialization is finished before providing services upon startup. Note that if there are a large number of tables and partitions and the value of [`lite-init-stats`](/tidb-configuration-file.md#lite-init-stats-new-in-v710) is `false`, setting `force-init-stats` to `true` might prolong the time it takes for TiDB to start providing services.
638638
+ When the value of `force-init-stats` is `false`, TiDB can still provide services before statistics initialization is finished, but the optimizer uses pseudo statistics to make decisions, which might result in suboptimal execution plans.
639639

640+
### skip-init-stats <span class="version-mark">New in v9.0.0</span>
641+
642+
> **Warning:**
643+
>
644+
> This configuration item is for maintenance purposes only. Do not enable it on TiDB nodes that handle regular workloads.
645+
646+
+ Controls whether to skip statistics initialization during TiDB startup.
647+
+ Default value: `false`
648+
+ When the value of `skip-init-stats` is `true`, TiDB skips statistics initialization during startup and does not load statistics afterward. It is useful if you need to start TiDB quickly without waiting for statistics initialization, especially when there are a large number of tables and partitions. However, it is intended for maintenance only. In most cases, do not set this configuration item to `true`; otherwise, the optimizer might generate suboptimal execution plans due to missing statistics.
649+
640650
### `enable-async-batch-get` <span class="version-mark">New in v8.5.5 and v9.0.0</span>
641651

642652
+ Controls whether TiDB uses asynchronous mode to execute the Batch Get operator. Using asynchronous mode can reduce goroutine overhead and provide better performance. Generally, there is no need to modify this configuration item.

0 commit comments

Comments
 (0)