pingcap/tidb

Parallel evaluation for aggregate functions with distinct in hashAgg

Open

#17.075 aberto em 10 de mai. de 2020

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Go (6.186 forks)batch import
help wantedsig/executiontype/enhancementtype/performance

Métricas do repositório

Stars
 (40.090 stars)
Métricas de merge de PR
 (Mesclagem média 14d 4h) (346 fundiu PRs em 30d)

Description

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.

Guia do colaborador