explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w75s

Settings
# exclusive inclusive rows x rows loops node
1. 50.737 51,004.105 ↓ 1.1 39,999 1

Finalize GroupAggregate (cost=1,439,797.50..1,441,299.14 rows=37,541 width=12) (actual time=50,926.429..51,004.105 rows=39,999 loops=1)

  • Group Key: co.cid
2. 137.382 50,953.368 ↓ 1.6 119,997 1

Sort (cost=1,439,797.50..1,439,985.21 rows=75,082 width=20) (actual time=50,926.421..50,953.368 rows=119,997 loops=1)

  • Sort Key: co.cid
  • Sort Method: external merge Disk: 4000kB
3. 55.186 50,815.986 ↓ 1.6 119,997 1

Gather (cost=1,425,833.69..1,433,717.30 rows=75,082 width=20) (actual time=50,750.072..50,815.986 rows=119,997 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 15,575.217 50,760.800 ↓ 1.1 39,999 3

Partial HashAggregate (cost=1,424,833.69..1,425,209.10 rows=37,541 width=20) (actual time=50,743.806..50,760.800 rows=39,999 loops=3)

  • Group Key: co.cid
5. 23,541.144 35,185.583 ↑ 1.2 25,332,894 3

Hash Join (cost=14,888.00..1,108,244.80 rows=31,658,889 width=6) (actual time=314.376..35,185.583 rows=25,332,894 loops=3)

  • Hash Cond: (cr.offerid = co.offerid)
6. 11,331.813 11,331.813 ↑ 1.2 25,332,894 3

Parallel Seq Scan on course_registrations cr (cost=0.00..761,352.33 rows=31,658,889 width=6) (actual time=0.844..11,331.813 rows=25,332,894 loops=3)

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

Hash (cost=8,325.00..8,325.00 rows=400,000 width=8) (actual time=312.625..312.626 rows=400,000 loops=3)

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

Seq Scan on course_offers co (cost=0.00..8,325.00 rows=400,000 width=8) (actual time=85.291..196.981 rows=400,000 loops=3)