explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pSNZ

Settings
# exclusive inclusive rows x rows loops node
1. 22,295.863 29,439.026 ↑ 1.0 1 1

Aggregate (cost=1,686,847.02..1,686,847.03 rows=1 width=8) (actual time=29,439.026..29,439.026 rows=1 loops=1)

2. 4,043.659 7,143.163 ↑ 2.4 46,982,193 1

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

3. 191.608 626.757 ↓ 23.3 2,472,747 1

Nested Loop Left Join (cost=51.45..1,410.06 rows=106,000 width=8) (actual time=308.645..626.757 rows=2,472,747 loops=1)

4. 8.163 323.764 ↓ 22.3 22,277 1

Hash Join (cost=51.31..75.06 rows=1,000 width=8) (actual time=308.618..323.764 rows=22,277 loops=1)

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

Function Scan on ufn_indicators_corefilter a (cost=0.25..10.25 rows=1,000 width=12) (actual time=308.347..315.346 rows=22,277 loops=1)

6. 0.093 0.255 ↑ 1.0 683 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
7. 0.162 0.162 ↑ 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.025..0.162 rows=683 loops=1)

  • Heap Fetches: 159
8. 111.334 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)

9. 0.051 0.051 ↓ 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.023..0.051 rows=111 loops=1)

  • Heap Fetches: 111
10. 2,472.735 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)

11. 0.005 0.012 ↑ 55.8 19 1

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

  • Heap Blocks: exact=1
12. 0.007 0.007 ↑ 55.8 19 1

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