You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT bitmapAndCardinality(user1,user2)
FROM (
SELECT 1 AS join_id,groupBitmap(toUInt32(did)]) AS user1
FROM t_r_1_local where region='Moscow') as a
INNER JOIN(
SELECT 1 AS join_id,groupBitmap(toUInt32(did)]) AS user2
FROM t_r_2_local where age=20) as b on a.join_id=b.join_id
In order to calculate the number of de-duplicated result of users in different user groups, we use the sql above。
but more user groups slows down the sql performance.
cause the computation process of groupBitmap with join are processed one by one.
Except for wide table, is there any moves which we can take to improve the performance?
Any suggestion will be welcomed (Including do some kernel modification)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
SELECT bitmapAndCardinality(user1,user2)
FROM (
SELECT 1 AS join_id,groupBitmap(toUInt32(did)]) AS user1
FROM t_r_1_local where region='Moscow') as a
INNER JOIN(
SELECT 1 AS join_id,groupBitmap(toUInt32(did)]) AS user2
FROM t_r_2_local where age=20) as b on a.join_id=b.join_id
In order to calculate the number of de-duplicated result of users in different user groups, we use the sql above。
but more user groups slows down the sql performance.
cause the computation process of groupBitmap with join are processed one by one.
Except for wide table, is there any moves which we can take to improve the performance?
Any suggestion will be welcomed (Including do some kernel modification)
Beta Was this translation helpful? Give feedback.
All reactions