felixwluo opened a new issue, #47863: URL: https://github.com/apache/doris/issues/47863
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Description tablet schema: `CREATE TABLE test.table_auto ( `id` int NOT NULL, `name` varchar(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? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org