itinycheng / flink-connector-clickhouse

Flink SQL connector for ClickHouse. Support ClickHouseCatalog and read/write primary data, maps, arrays to clickhouse.
Apache License 2.0
373 stars 156 forks source link

似乎写入速度很慢 #94

Open ysq5202121 opened 1 year ago

ysq5202121 commented 1 year ago

image image image image 不知道要怎么调整才能解决背压问题

ysq5202121 commented 1 year ago

@itinycheng

itinycheng commented 1 year ago

Sink只是将数据写出给server,没什么多余的操作; 如果是Upsert操作看下是否是大量生成Alter语句导致的;

ysq5202121 commented 1 year ago

@会有大量upsert

itinycheng commented 1 year ago

@会有大量upsert

可能和这个upsert有关,当前connector会将update的数据解析成 alter..update..,执行alter操作对clickhouse来说比较重; 这个是clickhouse慢,最好将update转成insert操作并配合表引擎来规避update操作,看下readme中的sink.update-strategy

ysq5202121 commented 1 year ago

@itinycheng 会造成flink炸裂

ysq5202121 commented 1 year ago

@itinycheng 如果改成insert就会出现大量重复数据,同步需要时间,会造成一段时间出现数据不正确的问题,如果采用版本似乎又不支持,需要写代码

ysq5202121 commented 1 year ago

难道我了

itinycheng commented 1 year ago

配合表引擎比如:ReplacingMergeTree这种是可以操作的,我这边也没太多别的方法;