Skip to content
About
Main content
Model

What partial aggregation saves

The average number of rows per group per partition. Below 1, expect almost nothing.

Rows
rows to aggregate
Partitions
partitions (executors)
Groups
distinct groups

Recurring principle: The algebra decides

How it behaves

One input on the horizontal axis, the others held fixed.

Data table
Rows a partition sends ÷ rows it holds, by rows per group per partition
N / (P·G)Reduction from partial aggregation
0.011.01×
0.0121.01×
0.0131.01×
0.0151.01×
0.0181.01×
0.0211.01×
0.0241.01×
0.0271.01×
0.0321.02×
0.0371.02×
0.0421.02×
0.0491.02×
0.0561.03×
0.0651.03×
0.0751.04×
0.0871.04×
0.11.05×
0.1151.06×
0.1331.07×
0.1541.08×
0.1781.09×
0.2051.11×
0.2371.12×
0.2741.14×
0.3161.17×
0.3651.19×
0.4221.23×
0.4871.26×
0.5621.31×
0.6491.36×
0.751.42×
0.8661.49×
11.58×
1.151.69×
1.331.81×
1.541.96×
1.782.14×
2.052.36×
2.372.62×
2.742.93×
3.163.3×
3.653.75×
4.224.28×
4.874.91×
5.625.64×
6.496.5×
7.57.5×
8.668.66×
1010×
11.511.5×
13.313.3×
15.415.4×
17.817.8×
20.520.5×
23.723.7×
27.427.4×
31.631.6×
36.536.5×
42.242.2×
48.748.7×
56.256.2×
64.964.9×
7575×
86.686.6×
100100×
115115×
133133×
154154×
178178×
205205×
237237×
274274×
316316×
365365×
422422×
487487×
562562×
649649×
750750×
866866×
1,0001,000×

Worked examples, recomputed

Every number the mechanisms quote for this relationship is recomputed from it, so none of them disagrees with it.

Where it appears

Each mechanism states it in its own names. The general symbol each name stands for is shown with it.

  • Query Processing

    Why can one question be answered by plans whose costs differ by a factor of ten thousand, and what does each operator force the engine to do?

    Read it in place →