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

[Bug]: sum(mo_table_size) takes long time for the database with more than 20000 tables #17366

Open
1 task done
DanielZhangQD opened this issue Jul 8, 2024 · 5 comments
Open
1 task done
Assignees
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@DanielZhangQD
Copy link
Contributor

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

1.2.1

Commit ID

v1.2.1-27b34c670-2024-06-28

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

  • DB write_test_0424 has 22268 tables
  • The following SQL takes more than 10 minutes:
mysql> select request_at,statement,statement_id,status,duration from system.statement_info where request_at > '2024-07-05 07:50:00' and statement_id = '019081e8-c056-7bf1-9c70-2b1ee674983d';
| 2024-07-05 08:00:32.854620 | explain analyze SELECT reldatabase, sum(mo_table_size (reldatabase, relname)) AS size FROM `mo_catalog`.`mo_tables` WHERE relkind in ('r','e','cluster','v') AND reldatabase in ('mo_catalog','gh_monitor','write_test_mo_mysql','mo_sample_data_tpch_sf10','saas_common','write_test_0424','system','system_metrics','information_schema','mo_sample_data_tpch_sf1','mysql','write_test','write_test_mo_mysql2','write_test_mo_mysql3','test') GROUP BY `reldatabase` | 019081e8-c056-7bf1-9c70-2b1ee674983d | Success | 600162520634 |

Expected Behavior

SQL succeeds in reasonable time

Steps to Reproduce

See detail in `Actual Behavior`

Additional information

Cloud prod env

@DanielZhangQD DanielZhangQD added kind/bug Something isn't working needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Jul 8, 2024
@DanielZhangQD DanielZhangQD added this to the 1.3.0 milestone Jul 8, 2024
@DanielZhangQD DanielZhangQD changed the title [Bug]: mo_table_size takes long time for the database with more than 20000 tables [Bug]: sum(mo_table_size) takes long time for the database with more than 20000 tables Jul 8, 2024
@DanielZhangQD
Copy link
Contributor Author

@XuPeng-SH
Copy link
Contributor

depends #15708

@gouhongshen
Copy link
Contributor

waiting

@gouhongshen
Copy link
Contributor

在做 partition state 重构

@gouhongshen
Copy link
Contributor

在做 reader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

5 participants