# [FAQ] 分区表在 dynamic 模式下 analyze table 出现 warning: disable dynamic pruning due to xx has no global stats

## Key Words

Analyze table, partiton, warning, disable dynamic pruning due to xx has no global stats

## Issue

对分区表首次执行 analyze table 后，出现 warnings

```
mysql> analyze table t;
Query OK, 0 rows affected, 4 warnings (0.12 sec)
mysql> show warnings;
+---------+------+----------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                |
+---------+------+----------------------------------------------------------------------------------------+
| Warning | 1105 | disable dynamic pruning due to t has no global stats                           |
| Note    | 1105 | Analyze use auto adjusted sample rate 1.000000 for table test.t's partition p0 |
| Warning | 1105 | disable dynamic pruning due to t has no global stats                           |
| Note    | 1105 | Analyze use auto adjusted sample rate 1.000000 for table test.t's partition p1 |
+---------+------+----------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)
```

## Root Case

GitHub issue: [https://github.com/pingcap/tidb/issues/42603](https://github.com/pingcap/tidb/issues/42603)
Analyze table 时出现这个 warning 不影响 SQL 执行。
统计信息仅在生成执行计划时会被用到，如果在执行 SQL 时出现这个 warning 则需要关注，说明某个分区缺少统计信息，可按官网文档 note 中的提示再做收集，并通过 show analyze status 看一下是否 merge global stats。
官网文档 [https://docs.pingcap.com/zh/tidb/stable/statistics#%E5%A2%9E%E9%87%8F%E6%94%B6%E9%9B%86](https://docs.pingcap.com/zh/tidb/stable/statistics#%E5%A2%9E%E9%87%8F%E6%94%B6%E9%9B%86)

## Workaround

在 analyze table 时出现可忽略。
