Skip to content

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

Open
@felixwluo

Description

@felixwluo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions