pingcap / pingcap/tidb

Deprecate the ```lite-init-stats``` configuration

Open
#60,208 0 comments 1 reaction 0 assignees View on GitHub
sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

```
TL;DR

The lite-init-stats is good enough, and there is no need for non-lite-init-stats.
```

The ```lite-init-stats``` configuration was introduced to provide a lightweight way to initialize statistics for query optimization. However, with the evolution of our system and the improvements in the sync load mechanism, the necessity of ```lite-init-stats``` has diminished.

## Sufficient Completeness of Sync Load

- current sync load mechanism has been significantly enhanced and is now robust enough to handle the initialization of statistics without the need for a lightweight alternative. It ensures that statistics are loaded efficiently and accurately, even under various workloads and scenarios.

- The previous concerns about sync load potentially causing timeouts have been addressed. The system now has better timeout handling and resource management, making it a reliable method for initializing statistics.

## Memory and Complexity Considerations

- non lite-init-stats will use more memory and load unnecessary data into memory.
- Because we need to manage stats status into memory to control whether it need to sync load. so it will add more complexity.

## Documentation and User Guidance

- The documentation has already been updated to remove recommendations for disabling ```lite-init-stats```. This indicates a shift in our guidance towards using the more comprehensive and reliable lite initialization method.

- Users are now encouraged to rely on the default statistics initialization mechanism, which aligns with the improvements in sync load and the overall system performance.

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.