You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by 潘峰 <pa...@playorcas.com> on 2023/05/11 08:32:01 UTC

用jdbc insert into 很慢

我们正在腾讯云上测试doris 1.2.0版本的服务.
我们建了以下这张表
CREATE TABLE pool.user_match ( operate_date INT, user_id VARCHAR(256), project_id INT, time_type TINYINT, match_num INT ) DUPLICATE KEY(`operate_date`, `user_id`) DISTRIBUTED BY HASH(`user_id`) BUCKETS 2

使用jdbc程序进行插入,连接字符串如下:

"jdbc:mysql://10.0.0.12:9030?useSSL=false&serverTimezone=GMT&allowPublicKeyRetrieval=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true" 已开启;rewriteBatchedStatements=true
程序中每10000条进行一次executeBacth();
发现大约每秒能插入75000条数据,同时可能出现如下报错:


我们同时还进行了腾讯云上的clickhouse测试,用jdbc的形式,相同的代码,插入效率大约是1900000条/s,大约相差了20多倍.我们应该如何修改代码或者配置来接近此效率呢?望回复


panfeng@playorcas.com