Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Initialization of Statistics for 10k+ Tables via Concurrent Loading #52102

Closed
hawkingrei opened this issue Mar 26, 2024 · 0 comments · Fixed by #51403
Closed

Optimize Initialization of Statistics for 10k+ Tables via Concurrent Loading #52102

hawkingrei opened this issue Mar 26, 2024 · 0 comments · Fixed by #51403
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@hawkingrei
Copy link
Member

hawkingrei commented Mar 26, 2024

Enhancement

The current implementation of the initialization process for statistics is observed to be inefficient when dealing with a large number of tables. The process is currently single-threaded, leading to slow performance as each table's statistics are loaded sequentially.

I propose that we refactor the init stats process to support concurrent loading of statistics. By leveraging Go's concurrency patterns, such as goroutines and channels, we can significantly reduce the time taken to initialize statistics by processing multiple tables in parallel.

@hawkingrei hawkingrei added the type/enhancement The issue or PR belongs to an enhancement. label Mar 26, 2024
@hawkingrei hawkingrei changed the title Optimize Initialization of Statistics for 10k Tables via Concurrent Loading Optimize Initialization of Statistics for 10k+ Tables via Concurrent Loading Mar 26, 2024
ti-chi-bot bot pushed a commit that referenced this issue Mar 28, 2024
@ti-chi-bot ti-chi-bot added the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Apr 1, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 1, 2024
hawkingrei pushed a commit to hawkingrei/tidb that referenced this issue Apr 1, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 1, 2024
@Ivy-YinSu Ivy-YinSu added the sig/planner SIG: Planner label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants