pingcap/tidb

Parallel evaluation for aggregate functions with distinct in hashAgg

開放

#17,075 建立於 2020年5月10日

 (1 則留言) (0 個反應) (0 位負責人)Go (6,186 個分叉)batch import
help wantedsig/executiontype/enhancementtype/performance

倉庫指標

星標
 (40,090 顆星)
PR 合併指標
 (平均合併 14天 4小時) (30 天內合併 346 個 PR)

描述

Development Task

select count(distinct a) from t;

Currently if one of the aggregate functions of a SQL has a distinct evaluation, the hashAgg executor must run in a single thread. See https://github.com/pingcap/tidb/blob/3224393/executor/builder.go#L1207

We may find a method to evaluate it in parallel, maybe a sync.Map for deduplicating entries can be shared in multiple goroutines.

貢獻者指南