Automatic Analyze Failure on Partitioned Table

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 分区表自动analyze失败

| username: dba-kit

【TiDB Usage Environment】Production Environment
【TiDB Version】v6.5.0
【Encountered Issue: Issue Phenomenon and Impact】
During troubleshooting, it was found that the statistics of some partitioned tables had not been updated for a long time. Manually executing analyze table partition resulted in an error, with the error message being:

| username: dba-kit | Original post link

According to the Warning prompt, first analyze the last partition, then execute the partition that reported the error, and the statistics will be normal.

| username: dba-kit | Original post link

Before manual analysis, the statistics for the 2023 partition do not exist. It seems that the automatic analyze is executed sequentially, and once it fails, the subsequent steps will not be executed.

| username: dba-kit | Original post link

Even empty partitions are affected.

| username: weixiaobing | Original post link

You can refer to the description above

| username: tidb菜鸟一只 | Original post link

Enabling dynamic pruning mode means that new partitions of a partitioned table must be manually analyzed first, otherwise, automatic analysis will report an error due to the lack of statistical information for the new partitions.

| username: WalterWj | Original post link

Upgrade + manual scheduled collection, and information can be collected according to partitions.

| username: BraveChen | Original post link

If you’re already using distributed systems, there’s no need to use partitioned tables.

| username: dba-kit | Original post link

To use partition tables + Placement rule for hot and cold data separation, there’s no way :face_exhaling:

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.