Tag
This article explains why PostgreSQL disables parallel query for count(DISTINCT) aggregates, causing full-table sorts and disk spills, and compares it to the parallel-friendly count(*).