Skip to content

[Tech Request]: implement mo_table_size/mo_table_row without subscribing to a table #15708

Closed

Description

@XuPeng-SH

Is there an existing issue for the same tech request?

  • I have checked the existing issues.

Does this tech request not affect user experience?

  • This tech request doesn't affect user experience.

What would you like to be added ?

implement mo_table_size/mo_table_row without subscribing to a table

Why is this needed ?

In some scenarios, such as looking at the size of all tables in a tenant, if you subscribe to all tables, the performance will be greatly affected.

Additional information

No response

Activity

  1. added
    kind/tech-request
    priority/p0
    on Apr 24, 2024
  2. added this to the 1.3.0-Backlog milestone on Apr 24, 2024
  3. modified the milestones: 1.3.0-Backlog, 1.3.0 on Jul 2, 2024
  4. modified the milestones: 2.0.0, 2.0.1 on Oct 14, 2024
  5. aressu1985 commented on Nov 12, 2024

    @aressu1985
    Contributor

    经和徐鹏沟通,这个加一个开关,如果测试通过,就2.0.1打开,如果不通过,就还保持原来的处理

  6. modified the milestones: 2.0.1, 2.1.0 on Nov 12, 2024
  7. 3 remaining items

  8. gouhongshen commented on Dec 2, 2024

    @gouhongshen
    Contributor

    2.0-dev commit:ce18acaf42edb560caaf4e31abf2c63e17cba433 以下测试场景为版本默认值(set mo_table_stats.force_update = no 查询快,但不保证准确性) 测试场景一:load 6亿行数据后查询mo_table_rows,mo_table_size 6亿行数据mo_table_rows,耗时0.01s,行数准确 企业微信截图_d258c3c7-88f3-4f98-bfeb-36927b797398

    6亿行数据mo_table_size,耗时0.01s 企业微信截图_4a1dc049-3922-4523-b112-8538a10e6e95

    测试场景二: 6亿数据delete 表部分数据后查询mo_table_rows,mo_table_size值是否正确 load 6亿行数据后查询mo_table_rows,mo_table_size mo_table_rows,mo_table_size的值是变少了,符合预期 image 但show table status行数rows没有更改,这部分待确认是否符合预期 image

    测试场景三:查询sql耗时也比较快 mysql> SELECT SUM(size) AS size FROM (SELECT mo_table_size(reldatabase, relname) AS size FROM mo_catalog.mo_tables WHERE relkind IN('r', 'e', 'cluster', 'v') AND reldatabase = 'tpch_1000g') AS t; +--------------+ | size | +--------------+ | 572887175748 | +--------------+ 1 row in set (0.01 sec)

    测试场景四: 同一db下有15万张表,单表10w行数据,delete部分数据

    show table status 的优化不在这个 feature,有单独的 Issue 在跟,是计算组同事在跟。

  9. Repository owner unassigned on Dec 3, 2024
  10. added
    phase/pm-validation
    on Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/tech-requestphase/pm-validationpriority/p0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions