explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1lge : Optimization for: plan #uejU

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.031 53.137 ↑ 1.0 76 1

Limit (cost=0.85..231.97 rows=76 width=63) (actual time=0.461..53.137 rows=76 loops=1)

2. 12.590 53.106 ↑ 126,061.1 76 1

Nested Loop Left Join (cost=0.85..29,135,818.42 rows=9,580,641 width=63) (actual time=0.460..53.106 rows=76 loops=1)

  • Join Filter: (p.personnelid = bp.personnelid)
  • Rows Removed by Join Filter: 64162
3. 0.109 33.752 ↑ 5,259.1 76 1

Nested Loop (cost=0.85..250,013.25 rows=399,693 width=63) (actual time=0.040..33.752 rows=76 loops=1)

4. 0.101 33.273 ↑ 2,800.3 37 1

Nested Loop (cost=0.42..142,111.09 rows=103,611 width=44) (actual time=0.015..33.273 rows=37 loops=1)

5. 0.020 0.020 ↑ 2,800.3 37 1

Seq Scan on stg_combined_jail_stays stg_js (cost=0.00..11,227.11 rows=103,611 width=38) (actual time=0.002..0.020 rows=37 loops=1)

6. 33.152 33.152 ↑ 1.0 1 37

Index Scan using people_pkey on people lkp_ppl (cost=0.42..1.25 rows=1 width=22) (actual time=0.895..0.896 rows=1 loops=37)

  • Index Cond: (peopleid = stg_js.peopleid)
7. 0.370 0.370 ↑ 2.5 2 37

Index Scan using dca_msp_bookingprocedure_bookingid_idx on msp_bookingprocedure bp (cost=0.42..0.99 rows=5 width=31) (actual time=0.007..0.010 rows=2 loops=37)

  • Index Cond: (bookingid = stg_js.convertedid)
8. 5.778 6.764 ↑ 5.7 845 76

Materialize (cost=0.00..183.91 rows=4,794 width=8) (actual time=0.001..0.089 rows=845 loops=76)

9. 0.986 0.986 ↑ 5.6 856 1

Seq Scan on msp_personnel p (cost=0.00..159.94 rows=4,794 width=8) (actual time=0.080..0.986 rows=856 loops=1)

Planning time : 16.944 ms
Execution time : 53.325 ms