大批量插入bitmap数据 #45406
大批量插入bitmap数据
#45406
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
有一个user表,数据量1亿。现在想做基于性别,年龄的打标,把userId插入到另一张tag表(bitmap表 user_ids是bitmap类型)中。对这种从doris查,并需要写入另一张doris表的场景,设计了如下两种方案,更推荐哪种?为什么?
insert into tag (id, user_ids)
select bitmap_union(bid)
from (select to_bitmap(id) bid
from user
where sex = 0) t;
查询对应user_id,发送到kafka通过routine load再导入tag表
Beta Was this translation helpful? Give feedback.
All reactions