Does anyone have suggestions for optimizing an impressions table that needs to return a distinct count of user_ids over multiple months?
We are filtering and grouping on
Assuming page_name already has an inverted index for filtering
p
Phil Sheets
06/20/2023, 2:06 PM
Jayesh did not have an inverted index. That solved the issue! Thank you
š 1
k
Kishore G
06/20/2023, 3:38 PM
If you partition on userid, you can use partitioned distinct count
m
Mayank
06/20/2023, 7:15 PM
Yea, partitioned version will be accurate and fast. If you are ok with approximations, Iād recommend HLL over theta sketches purely for count distinct. You can use HLL with StarTree index to make it even faster