explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i7ts

Settings
# exclusive inclusive rows x rows loops node
1. 51.387 107,365.080 ↓ 1.1 39,999 1

Finalize GroupAggregate (cost=6,362,988.83..7,407,529.10 rows=37,284 width=44) (actual time=87,143.036..107,365.080 rows=39,999 loops=1)

  • Group Key: co.cid
2. 0.000 107,313.693 ↓ 1.6 119,997 1

Gather Merge (cost=6,362,988.83..7,403,241.44 rows=74,568 width=52) (actual time=87,142.773..107,313.693 rows=119,997 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 42,054.807 317,295.153 ↓ 1.1 39,999 3

Partial GroupAggregate (cost=6,361,988.80..7,393,634.42 rows=37,284 width=52) (actual time=85,856.926..105,765.051 rows=39,999 loops=3)

  • Group Key: co.cid
4. 117,299.256 275,240.346 ↑ 1.3 25,332,894 3

Sort (cost=6,361,988.80..6,441,317.48 rows=31,731,470 width=6) (actual time=85,856.547..91,746.782 rows=25,332,894 loops=3)

  • Sort Key: co.cid
  • Sort Method: external merge Disk: 396760kB
5. 78,449.499 157,941.090 ↑ 1.3 25,332,894 3

Hash Join (cost=12,726.00..1,106,845.09 rows=31,731,470 width=6) (actual time=225.910..52,647.030 rows=25,332,894 loops=3)

  • Hash Cond: (cr.offerid = co.offerid)
6. 78,821.703 78,821.703 ↑ 1.3 25,332,894 3

Parallel Seq Scan on course_registrations cr (cost=0.00..761,356.10 rows=31,731,470 width=6) (actual time=0.441..26,273.901 rows=25,332,894 loops=3)

  • Filter: (grade IS NOT NULL)
  • Rows Removed by Filter: 1333773
7. 362.028 669.888 ↑ 1.0 400,000 3

Hash (cost=6,163.00..6,163.00 rows=400,000 width=8) (actual time=223.296..223.296 rows=400,000 loops=3)

  • Buckets: 131072 Batches: 8 Memory Usage: 2978kB
8. 307.860 307.860 ↑ 1.0 400,000 3

Seq Scan on course_offers co (cost=0.00..6,163.00 rows=400,000 width=8) (actual time=0.019..102.620 rows=400,000 loops=3)