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

[Enhancement] Optimize the CPU usage of writing automatic partition tables #47863

Open
3 tasks done
felixwluo opened this issue Feb 13, 2025 · 1 comment
Open
3 tasks done

Comments

@felixwluo
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Description

tablet schema:
CREATE TABLE test.table_auto ( idint NOT NULL,namevarchar(65533) NOT NULL,TIME_STAMP datetime NOT NULL ) ENGINE=OLAP DUPLICATE KEY(id) AUTO PARTITION BY RANGE (date_trunc(TIME_STAMP, 'week')) () DISTRIBUTED BY HASH(id) BUCKETS 10 PROPERTIES ( "replication_allocation" = "tag.location.default: 3", "min_load_replica_num" = "-1", "is_being_synced" = "false", "storage_medium" = "hdd", "storage_format" = "V2", "inverted_index_storage_format" = "V1", "light_schema_change" = "true", "disable_auto_compaction" = "false", "enable_single_replica_compaction" = "false", "group_commit_interval_ms" = "10000", "group_commit_data_bytes" = "134217728" );

Problem: After using the insert into statement to write data to the table_auto table in batches, the CPU of the BE node will rise to more than 85%.

Solution

  1. Optimize the calculation of date_trunc function.
  2. There should also be room for optimization in the calculation of partition deduplication.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@zclllyybb
Copy link
Contributor

OK, I will schedule to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants