git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 26ae660) | patch
Allow parallel DISTINCT
2021年8月22日 11:31:16 +0000 (23:31 +1200)
2021年8月22日 11:31:16 +0000 (23:31 +1200)
commit 22c4e88ebff408acd52e212543a77158bde59e69
Allow parallel DISTINCT

We've supported parallel aggregation since e06a38965. At the time, we
didn't quite get around to also adding parallel DISTINCT. So, let's do
that now.

This is implemented by introducing a two-phase DISTINCT. Phase 1 is
performed on parallel workers, rows are made distinct there either by
hashing or by sort/unique. The results from the parallel workers are
combined and the final distinct phase is performed serially to get rid of
any duplicate rows that appear due to combining rows for each of the
parallel workers.

Author: David Rowley
Reviewed-by: Zhihong Yu
Discussion: https://postgr.es/m/CAApHDvrjRxVKwQN0he79xS+9wyotFXL=RmoWqGGO2N45Farpgw@mail.gmail.com
src/backend/optimizer/README diff | blob | blame | history
src/backend/optimizer/plan/planner.c diff | blob | blame | history
src/include/nodes/pathnodes.h diff | blob | blame | history
src/test/regress/expected/select_distinct.out diff | blob | blame | history
src/test/regress/sql/select_distinct.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /