Jackie
08/02/2021, 4:11 AMxtrntr
08/02/2021, 10:46 AMxtrntr
08/02/2021, 1:49 PMuserId
to ID_SET(userId)
, it times out for me on the quickstart docker image
# without id_set
SELECT userId, count(userId) FROM events WHERE ((timeBin BETWEEN 0 AND 21) AND (cell BETWEEN 1000 AND 1005)) GROUP BY userId having count(*) > 15
# with id_set
Timed out while combining group-by order-by results after 9995ms
xtrntr
08/02/2021, 1:51 PMuserId
are comprised of extremely long strings (e.g. F0B19EF3B76702507C5C07592148556B9808D3E5E49344FD4B162D51BEFF60B3
), would it help to change them to ints?
alternatively, i’ve tried the following
# get the distinct set of user ids
select ... from events where ...
# manually form the sql query from the result of previous query
select ... from events where userIds in $RESULT_OF_FIRST_QUERY and $OTHER_CONDITIONS
this works, with up to 1000 userId
. but it fails with ID_SET
xtrntr
08/02/2021, 3:31 PMID_SET
when i want to filter with a group by + having clause? e.g.
SELECT user, count(*) FROM events WHERE time BETWEEN 0 AND 31 AND location BETWEEN 1000 AND 1005 GROUP BY user HAVING count(*) > 10
user count(*)
1052157 15
97517 17
...
SELECT ID_SET(user), count(*) FROM events WHERE time BETWEEN 0 AND 31 AND location BETWEEN 1000 AND 1005 GROUP BY user HAVING count(*) > 10
idset(user) count(*)
AgAAAAABAAAAADowAAABAAAAEAAAABAAAAD9DQ== 15
AgAAAAABAAAAADowAAABAAAAAQAAABAAAADtfA== 17
...
xtrntr
08/04/2021, 1:45 AMIdSet
on the client side, so client would have to manage 2 different queries