explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C0MF

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Gather (cost=101,580.77..17,700,894.67 rows=3,355,843 width=28) (actual rows= loops=)

  • Workers Planned: 3
2. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=100,580.77..329,560.54 rows=1,082,530 width=24) (actual rows= loops=)

  • Hash Cond: ((t.id = dr.deal_id) AND (dfs.deal_funnel_id = dr.deal_funnel_id) AND (dfs.id = dr.deal_funnel_status_id))
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,058.47..106,333.39 rows=1,125,675 width=28) (actual rows= loops=)

  • Hash Cond: (t.deal_funnel_status_id = dfsu.id)
  • Join Filter: ((dfs.sort < dfsu.sort) AND ((dfsu.status_type = ANY ('{intermediate,success,initial}'::analytics.deal_funnel_status_type_mnemonic[])) OR ((dfsu.status_type = 'failure'::analytics.deal_funnel_status_type_mnemonic) AND (dfs.status_type = 'initial'::analytics.deal_funnel_status_type_mnemonic)) OR ((dfsu.status_type = 'failure_analysis'::analytics.deal_funnel_status_type_mnemonic) AND (dfs.status_type = ANY ('{initial,failure}'::analytics.deal_funnel_status_type_mnemonic[])))))
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=497.49..94,372.81 rows=4,341,625 width=36) (actual rows= loops=)

  • Hash Cond: (t.deal_funnel_id = dfs.deal_funnel_id)
5. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on deal t (cost=0.00..30,715.75 rows=451,275 width=20) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=368.40..368.40 rows=10,327 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on deal_funnel_status dfs (cost=0.00..368.40 rows=10,327 width=16) (actual rows= loops=)

  • Filter: ((NOT is_removed) AND (status_type <> 'failure_analysis'::analytics.deal_funnel_status_type_mnemonic))
8. 0.000 0.000 ↓ 0.0

Hash (cost=442.60..442.60 rows=9,471 width=12) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on deal_funnel_status dfsu (cost=0.00..442.60 rows=9,471 width=12) (actual rows= loops=)

  • Filter: ((NOT is_removed) AND ((status_type = ANY ('{intermediate,success,initial}'::analytics.deal_funnel_status_type_mnemonic[])) OR (status_type = 'failure'::analytics.deal_funnel_status_type_mnemonic) OR (status_type = 'failure_analysis'::analytics.deal_funnel_status_type_mnemonic)))
10. 0.000 0.000 ↓ 0.0

Hash (cost=46,225.38..46,225.38 rows=2,381,138 width=12) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on deal_route dr (cost=0.00..46,225.38 rows=2,381,138 width=12) (actual rows= loops=)

12.          

SubPlan (forGather)

13. 0.000 0.000 ↓ 0.0

Limit (cost=5.07..5.08 rows=1 width=12) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Sort (cost=5.07..5.08 rows=1 width=12) (actual rows= loops=)

  • Sort Key: drs.sort
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.72..5.06 rows=1 width=12) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using fki_deal_route__deal_id on deal_route dr_1 (cost=0.43..2.76 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (deal_id = t.id)
  • Filter: (deal_funnel_id = t.deal_funnel_id)
17. 0.000 0.000 ↓ 0.0

Index Scan using pk_deal_funnel_status on deal_funnel_status drs (cost=0.29..2.31 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = dr_1.deal_funnel_status_id)
  • Filter: ((NOT is_removed) AND (sort > dfs.sort))