pingcap/tidb
在 GitHub 查看Parallel evaluation for aggregate functions with distinct in hashAgg
Open
#17,075 创建于 2020年5月10日
help wantedsig/executiontype/enhancementtype/performance
仓库指标
- Star
- (40,090 star)
- 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.