Fast analyze hasn't reached General Availability and only supports analyze version 1 currently

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

Original topic: Fast analyze hasn’t reached General Availability and only support analyze version 1 currently

| username: 等一分钟

[TiDB Usage Environment] Production Environment
[TiDB Version] v6.5.1
Previously it was working, but now executing analyze table reports this error. Does it have any impact on performance?

| username: 像风一样的男子 | Original post link

Check the value of tidb_analyze_version.

| username: 像风一样的男子 | Original post link

The image is not visible. Please provide the text you need translated.

| username: 等一分钟 | Original post link

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

Two options: either set tidb_analyze_version to 1, or set tidb_enable_fast_analyze to 0.

| username: 等一分钟 | Original post link

The key is that I haven’t manually adjusted it. Why was it working before?

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

Take a look at the tidb_enable_fast_analyze parameter. This is disabled by default. Did you or someone else enable it?

| username: 等一分钟 | Original post link

The default value of tidb_gc_life_time is 10m, which means that the data deleted within 10 minutes can be recovered. If you want to recover data from a longer time ago, you need to set tidb_gc_life_time to a larger value before deleting the data.

| username: 等一分钟 | Original post link

Just set global tidb_enable_fast_analyze=0; and it should be fine.

| username: 像风一样的男子 | Original post link

Manual analyze will use fast_analyze, which will cause an error.

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

Correct, this is not compatible with analyze version 2.