explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6c2qT : Optimization for: Optimization for: Optimization for: Optimization for: plan #NtYB; plan #GWNr; plan #6YFu; plan #BpRV

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 14.260 ↑ 1.0 1 1

Limit (cost=4.88..11.89 rows=1 width=121) (actual time=14.260..14.260 rows=1 loops=1)

2.          

Initplan (for Limit)

3. 0.013 0.013 ↑ 1.0 1 1

Seq Scan on property_subtypes (cost=0.00..1.44 rows=1 width=8) (actual time=0.010..0.013 rows=1 loops=1)

  • Filter: ((code)::text = 'attached_doc'::text)
  • Rows Removed by Filter: 34
4. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on property_statuses (cost=0.00..1.29 rows=1 width=8) (actual time=0.004..0.009 rows=1 loops=1)

  • Filter: ((description)::text = 'In Digital Files'::text)
  • Rows Removed by Filter: 22
5. 14.006 14.258 ↑ 187,293.0 1 1

Nested Loop (cost=2.15..1,312,711.16 rows=187,293 width=121) (actual time=14.258..14.258 rows=1 loops=1)

6. 0.003 0.236 ↑ 189,861.0 1 1

Nested Loop (cost=1.72..1,120,801.18 rows=189,861 width=97) (actual time=0.236..0.236 rows=1 loops=1)

7. 0.000 0.214 ↑ 40,439.0 1 1

Nested Loop (cost=1.29..1,063,420.52 rows=40,439 width=103) (actual time=0.214..0.214 rows=1 loops=1)

8. 0.002 0.200 ↑ 40,439.0 1 1

Nested Loop (cost=0.87..1,043,335.78 rows=40,439 width=89) (actual time=0.200..0.200 rows=1 loops=1)

9. 0.001 0.180 ↑ 42,162.0 1 1

Nested Loop (cost=0.43..1,022,588.97 rows=42,162 width=82) (actual time=0.180..0.180 rows=1 loops=1)

  • Join Filter: (du.usagetype = ut.usagetype)
  • Rows Removed by Join Filter: 3
10. 0.019 0.145 ↑ 913,513.0 2 1

Nested Loop (cost=0.43..940,368.17 rows=1,827,026 width=86) (actual time=0.107..0.145 rows=2 loops=1)

11. 0.006 0.006 ↑ 196,587.9 8 1

Seq Scan on doc_index di (cost=0.00..59,553.03 rows=1,572,703 width=69) (actual time=0.006..0.006 rows=8 loops=1)

12. 0.120 0.120 ↓ 0.0 0 8

Index Scan using yrk_docusage on yrk_documentusage du (cost=0.43..0.55 rows=1 width=17) (actual time=0.015..0.015 rows=0 loops=8)

  • Index Cond: (documentid = split_part(di.filename, '.'::text, 1))
13. 0.003 0.034 ↑ 1.5 2 2

Materialize (cost=0.00..4.64 rows=3 width=4) (actual time=0.005..0.017 rows=2 loops=2)

14. 0.031 0.031 ↑ 1.0 3 1

Seq Scan on yrk_globalusagetype ut (cost=0.00..4.62 rows=3 width=4) (actual time=0.008..0.031 rows=3 loops=1)

  • Filter: (usageid = 'IncidentID'::text)
  • Rows Removed by Filter: 127
15. 0.018 0.018 ↑ 1.0 1 1

Index Scan using yrk_attach_index on yrk_documentindex d (cost=0.43..0.48 rows=1 width=25) (actual time=0.018..0.018 rows=1 loops=1)

  • Index Cond: (documentid = du.documentid)
16. 0.014 0.014 ↑ 1.0 1 1

Index Scan using yrk_incident_index on yrk_leincident i (cost=0.43..0.49 rows=1 width=18) (actual time=0.014..0.014 rows=1 loops=1)

  • Index Cond: (incidentid = du.usagekey)
17. 0.019 0.019 ↑ 30.0 1 1

Index Scan using yrk_cfs_incnum on yrk_callforservice c (cost=0.43..1.12 rows=30 width=22) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (incidentnumber = i.incidentnumber)
18. 0.016 0.016 ↑ 1.0 1 1

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

  • Index Cond: ((wtrun = 101) AND (convertedid = c.yrk_callforservice_zid))
Planning time : 38.835 ms
Execution time : 14.435 ms