explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NtYB

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 28.442 ↑ 1.0 1 1

Limit (cost=1.14..5.72 rows=1 width=69) (actual time=28.441..28.442 rows=1 loops=1)

2. 17.453 28.440 ↑ 2,714,505.0 1 1

Nested Loop (cost=1.14..12,437,696.81 rows=2,714,505 width=69) (actual time=28.440..28.440 rows=1 loops=1)

3. 0.003 10.960 ↑ 2,819,093.0 1 1

Nested Loop (cost=0.86..2,979,366.81 rows=2,819,093 width=53) (actual time=10.960..10.960 rows=1 loops=1)

4. 0.003 10.923 ↑ 2,591,861.0 1 1

Nested Loop (cost=0.43..1,672,893.11 rows=2,591,861 width=36) (actual time=10.923..10.923 rows=1 loops=1)

5. 0.014 0.014 ↑ 2,613,413.0 1 1

Seq Scan on yrk_callforservice cfs (cost=0.00..346,383.13 rows=2,613,413 width=12) (actual time=0.014..0.014 rows=1 loops=1)

6. 10.906 10.906 ↑ 1.0 1 1

Index Scan using stg_combined_incidents_wtrun_convertedid_idx on stg_combined_incidents ci (cost=0.43..0.50 rows=1 width=40) (actual time=10.906..10.906 rows=1 loops=1)

  • Index Cond: ((wtrun = 101) AND (convertedid = cfs.yrk_callforservice_zid))
7. 0.034 0.034 ↑ 2.0 1 1

Index Scan using distinct_unit_index on z_distinct_unit u (cost=0.43..0.48 rows=2 width=21) (actual time=0.034..0.034 rows=1 loops=1)

  • Index Cond: ((cfsid = cfs.cfsid) AND (cad_unitsid IS NOT NULL))
8. 0.016 0.016 ↑ 1.0 1 1

Index Scan using cad_units_pkey on cad_units cu (cost=0.28..0.30 rows=1 width=24) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (cad_unitsid = u.cad_unitsid)
9.          

SubPlan (for Nested Loop)

10. 0.011 0.011 ↑ 1.0 1 1

Index Scan using distinct_unit_index on z_distinct_unit u_1 (cost=0.43..2.90 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: (cfsid = cfs.cfsid)
  • Filter: primaryunitflag
  • Rows Removed by Filter: 1
Planning time : 0.941 ms
Execution time : 28.509 ms