explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VCQe

Settings
# exclusive inclusive rows x rows loops node
1. 23,868.692 45,155.272 ↑ 200.0 1 1

GroupAggregate (cost=25,647,511.76..26,490,213.76 rows=200 width=40) (actual time=45,155.272..45,155.272 rows=1 loops=1)

  • Group Key: a.groupby
2. 14,136.481 21,286.580 ↑ 2.4 46,982,193 1

Sort (cost=25,647,511.76..25,928,411.76 rows=112,360,000 width=40) (actual time=15,809.819..21,286.580 rows=46,982,193 loops=1)

  • Sort Key: a.groupby
  • Sort Method: external sort Disk: 826672kB
3. 4,007.602 7,150.099 ↑ 2.4 46,982,193 1

Nested Loop Left Join (cost=65.17..1,405,947.02 rows=112,360,000 width=40) (actual time=303.979..7,150.099 rows=46,982,193 loops=1)

4. 234.083 669.750 ↓ 23.3 2,472,747 1

Nested Loop Left Join (cost=51.45..1,410.06 rows=106,000 width=40) (actual time=303.962..669.750 rows=2,472,747 loops=1)

5. 12.813 324.282 ↓ 22.3 22,277 1

Hash Join (cost=51.31..75.06 rows=1,000 width=40) (actual time=303.937..324.282 rows=22,277 loops=1)

  • Hash Cond: (a.schoolid = b.schoolid)
6. 311.220 311.220 ↓ 22.3 22,277 1

Function Scan on ufn_indicators_corefilter a (cost=0.25..10.25 rows=1,000 width=44) (actual time=303.672..311.220 rows=22,277 loops=1)

7. 0.066 0.249 ↑ 1.0 683 1

Hash (cost=42.52..42.52 rows=683 width=4) (actual time=0.249..0.249 rows=683 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
8. 0.183 0.183 ↑ 1.0 683 1

Index Only Scan using school_pkey on school b (cost=0.28..42.52 rows=683 width=4) (actual time=0.026..0.183 rows=683 loops=1)

  • Heap Fetches: 159
9. 111.339 111.385 ↓ 1.0 111 22,277

Materialize (cost=0.14..10.26 rows=106 width=0) (actual time=0.000..0.005 rows=111 loops=22,277)

10. 0.046 0.046 ↓ 1.0 111 1

Index Only Scan using schoolgroup_pkey on schoolgroup e (cost=0.14..9.73 rows=106 width=0) (actual time=0.022..0.046 rows=111 loops=1)

  • Heap Fetches: 111
11. 2,472.730 2,472.747 ↑ 55.8 19 2,472,747

Materialize (cost=13.72..39.62 rows=1,060 width=0) (actual time=0.000..0.001 rows=19 loops=2,472,747)

12. 0.009 0.017 ↑ 55.8 19 1

Bitmap Heap Scan on schoolcomplex f (cost=13.72..34.32 rows=1,060 width=0) (actual time=0.016..0.017 rows=19 loops=1)

  • Heap Blocks: exact=1
13. 0.008 0.008 ↑ 55.8 19 1

Bitmap Index Scan on "schoolcomplex. schoolcomplexid" (cost=0.00..13.45 rows=1,060 width=0) (actual time=0.008..0.008 rows=19 loops=1)