explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w6H7 : PG10-QueryPlan-MoreComplexAggJoins-Parallel

Settings
# exclusive inclusive rows x rows loops node
1. 259.852 7,073.545 ↑ 2.0 68,031 1

Finalize GroupAggregate (cost=265,229.54..332,635.00 rows=135,362 width=134) (actual time=4,871.639..7,073.545 rows=68,031 loops=1)

  • Group Key: s.station_id, c.calendarweek
2. 0.000 6,813.693 ↑ 1.5 175,205 1

Gather Merge (cost=265,229.54..324,513.28 rows=270,724 width=78) (actual time=4,871.623..6,813.693 rows=175,205 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2,425.833 18,982.359 ↑ 2.3 58,402 3

Partial GroupAggregate (cost=264,229.52..292,264.99 rows=135,362 width=78) (actual time=4,845.402..6,327.453 rows=58,402 loops=3)

  • Group Key: s.station_id, c.calendarweek
4. 5,543.985 16,556.526 ↑ 1.6 976,357 3

Sort (cost=264,229.52..268,041.21 rows=1,524,677 width=14) (actual time=4,845.370..5,518.842 rows=976,357 loops=3)

  • Sort Key: s.station_id, c.calendarweek
  • Sort Method: external merge Disk: 26176kB
5. 4,321.773 11,012.541 ↑ 1.6 976,357 3

Hash Join (cost=416.49..81,587.14 rows=1,524,677 width=14) (actual time=18.384..3,670.847 rows=976,357 loops=3)

  • Hash Cond: (d.calendar_id = c.calendar_id)
6. 4,142.097 6,643.635 ↑ 1.6 976,357 3

Hash Join (cost=89.47..62,012.68 rows=1,524,677 width=16) (actual time=2.613..2,214.545 rows=976,357 loops=3)

  • Hash Cond: (d.station_id = s.station_id)
7. 2,493.954 2,493.954 ↑ 1.6 976,357 3

Parallel Seq Scan on daily d (cost=0.00..42,679.46 rows=1,524,677 width=16) (actual time=0.051..831.318 rows=976,357 loops=3)

  • Filter: ((t_min IS NOT NULL) OR (t_max IS NOT NULL))
  • Rows Removed by Filter: 325280
8. 3.840 7.584 ↑ 1.0 2,554 3

Hash (cost=57.54..57.54 rows=2,554 width=4) (actual time=2.528..2.528 rows=2,554 loops=3)

  • Buckets: 4096 Batches: 1 Memory Usage: 122kB
9. 3.744 3.744 ↑ 1.0 2,554 3

Seq Scan on station s (cost=0.00..57.54 rows=2,554 width=4) (actual time=0.007..1.248 rows=2,554 loops=3)

10. 33.489 47.133 ↑ 1.0 8,401 3

Hash (cost=222.01..222.01 rows=8,401 width=6) (actual time=15.711..15.711 rows=8,401 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 457kB
11. 13.644 13.644 ↑ 1.0 8,401 3

Seq Scan on calendar c (cost=0.00..222.01 rows=8,401 width=6) (actual time=0.008..4.548 rows=8,401 loops=3)

Planning time : 0.460 ms
Execution time : 7,108.967 ms