New answers tagged aggregate
4
votes
Accepted
SQL Server SUM in subquery causing arithmetic overflow when the SUM is less than a 32-bit int
The top branch of the execution plan selects all 1,098,300 rows from Inventory and performs
SELECT SUM(NetWeight),
ManifestID
FROM Inventory
GROUP BY ManifestID
The output of this (estimated ...
0
votes
Accepted
Finalize GroupAggregate parent using Partial HashAggregate child nodes in Postgres query plan
As the other answer explains, the individual child workers have duplicates between them. The parent needs to remove these duplicates. Both hashing and sorting are valid methods to remove duplicates.
...
1
vote
Finalize GroupAggregate parent using Partial HashAggregate child nodes in Postgres query plan
The parallel subplans can potentially return duplicates (in relation to the group key): since the blocks coming out of the Parallel Seq Scan are not distributed between the parallel workers by the ...
Top 50 recent answers are included
Related Tags
aggregate × 628postgresql × 269
sql-server × 120
mysql × 95
group-by × 69
join × 48
window-functions × 45
oracle × 38
performance × 32
mongodb × 30
query × 26
count × 23
array × 23
sql-server-2012 × 20
t-sql × 19
query-performance × 18
functions × 18
json × 17
greatest-n-per-group × 17
select × 16
subquery × 15
pivot × 15
postgresql-9.4 × 14
sum × 13
database-design × 12