pingcap / pingcap/tidb

Could we remove the variable "tidb_enable_pseudo_for_outdated_stats" that have always been deprecated

Open
#63,151 1 comment 0 reactions 1 assignee Claimed by @elsa0520 View on GitHub
component/statistics sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

This variable ”tidb_enable_pseudo_for_outdated_stats“ purpose is to replace outdated statistics with pseudo statistics when the number of table row changes exceeds a specified ratio "PseudoEstimateRatio".

However, while reorganizing the code, I discovered that:
1. This configuration was disabled three years ago due to customer issues and has never been enabled since. https://github.com/pingcap/tidb/pull/36797
2. This setting itself is unreasonable. Even if table statistics are outdated, directly falling back to pseudo statistics is extremely dangerous.

I therefore recommend deleting this configuration, along with related configurations and code.

The reference logic of this variable/config
1. related variable

Image

2. related config only used by this variable logic

Image

3. related const param

Image

4. related code logic

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.