-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
ANALYZE TABLE execution time depending on number of partitions #35142
Comments
Maybe only use a sample/subset of the partitions to run analyze on for dynamic prune mode? |
Example of the same table, but with 8192 hash partitions, taking 2 1/2 hour to complete
|
/assign |
There seems to be three reasons:
|
Hi, @mjonss We revised this processing in: In our latest test, with 8 read partition stats concurrency and 16 merging partition concurrency, cost 5mins to analyze the table with 1024 partitions and cost 9min30s to analyze the table with 2048 partitions. Thus I think the problem is solved and can be closed for now, feel free to reopen or comment if you have any questions. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Also note that under
@@tidb_partition_prune_mode = 'dynamic'
it takes longer time than usingstatic
prune mode.Also decreasing the sample rate does take less time, but not proportionally to the decrease (1/10 sample rate -> 8/10 consumed time).
2. What did you expect to see? (Required)
time to run
ANALYZE TABLE
not taking additional time per partition to run, resulting in too long execution time for tables with many partitions (currently we support 8192 partitions).3. What did you see instead (Required)
Execution time depending on number of partitions
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: