Description
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
- Optimize the calculation of date_trunc function.
- 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
- I agree to follow this project's Code of Conduct