Grace Lu
04/21/2022, 3:52 PMselect uuid, count(*) from table group by 1
I get very inaccurate aggregation result, for example, uuid a
will show it only has 3 records in count() here, but if I only query specifically for this uuid, like `select uuid, count() from table where uuid='a' group by 1` , it will show the correct result which is 100. Can someone help me understand what is going on here?🙏Richard Startin
04/21/2022, 3:56 PMGrace Lu
04/21/2022, 3:56 PMRichard Startin
04/21/2022, 3:58 PMgroup by uuid
instead? Very likely the same thing, but doesn't hurt to checkRichard Startin
04/21/2022, 3:58 PMRichard Startin
04/21/2022, 3:58 PMRichard Startin
04/21/2022, 3:59 PMlimit 10
to the faulty query please?Grace Lu
04/21/2022, 3:59 PMgroup by uuid
return the same resultGrace Lu
04/21/2022, 4:00 PMlimit 10
also gives similar undercounting resultRichard Startin
04/21/2022, 4:03 PMRichard Startin
04/21/2022, 4:04 PMGrace Lu
04/21/2022, 4:04 PMbecause uuid cardinality is so high, the group by is truncatedIs there any writeup help me understand the truncate behavior here? Is this a feature? If so why it seems to introduce such high discrepancy?
Grace Lu
04/21/2022, 4:04 PMGrace Lu
04/21/2022, 4:06 PMif you upgrade to 0.10.0 you can get an explain planyeah I can try to do an ungrade. What do you think the potential solution could be?
Richard Startin
04/21/2022, 4:06 PMRichard Startin
04/21/2022, 4:07 PMRichard Startin
04/21/2022, 4:14 PMorder by uuid
please?Grace Lu
04/21/2022, 4:18 PMGrace Lu
04/21/2022, 4:54 PMorder by uuid
is too heavy to run? I kept getting 502 bad gateway or server not respond errorGrace Lu
04/21/2022, 4:54 PMGrace Lu
04/21/2022, 4:56 PMGrace Lu
04/21/2022, 4:56 PMHaitao Zhang
04/28/2022, 4:46 AMGrace Lu
04/28/2022, 6:43 PMGrace Lu
03/20/2023, 8:42 PM