Repository navigation
Make aggregate state merge parallel for key8 and key16. - #87366
Conversation
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
some notes https://pastila.nl/?029696d4/e8c50f64d3799b6e0cc1f9da7770dfe7#w6qdcZYrJ67XJhbWGV8TEw== also pipeline how coordinate, state transition is key. almost like still sequential for single level. Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
… via prepareBlockAndFillSingleLevel Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
|
Workflow [PR], commit [8b9cac5] Summary: ❌
|
Signed-off-by: Jianfei Hu <[email protected]>
5eb06ca to
32a2b55
Compare
Signed-off-by: Jianfei Hu <[email protected]>
a471df8 to
c5a3c05
Compare
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
23367a0 to
79b9ad8
Compare
a2fb81f to
dce079f
Compare
Signed-off-by: Jianfei Hu <[email protected]>
dce079f to
7cc9b44
Compare
|
Yeah. That's because we check fixed hashmap size during the merge, via checkLimits which require iterate all element in the buffer to see if they are zero. Meanwhile other threads are adding new entries to the first map. I think we might be able to skip |
It's fine to do the check on a single thread once a merge is done |
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
22bcb38 to
b00fc8e
Compare
Signed-off-by: Jianfei Hu <[email protected]>
b00fc8e to
6b7ff25
Compare
Signed-off-by: Jianfei Hu <[email protected]>
1450e9d to
e677112
Compare
Signed-off-by: Jianfei Hu <[email protected]>
|
Hi @nickitat this is ready for another look, thanks! |
4303e6d to
6ef5b27
Compare
Signed-off-by: Jianfei Hu <[email protected]>
6ef5b27 to
6c34c81
Compare
|
|
|
Hi @nickitat all comments have been addressed, PTAL, thanks! |
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu <[email protected]>
Signed-off-by: Jianfei Hu [email protected]
Resolves #63666 Implemented the idea from #63667 (comment)
mergeToViaIndexFilterto FixedHashMapmax_threads. Each thread uses their own thread id to invokemergeToViaIndexFilterto avoid race condition on the fixed hash map.We can see noticeable performance improvement for the original query, which uses fixed hash map during aggregation.
Changelog category (leave one):
Changelog entry
When a query uses fixed hash map for aggregation state(group by a small integer), ClickHouse would merge the aggregation state in parallel to speed up the query. Resolves #63666