explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7r7F

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

Hash Left Join (cost=368,666.65..228,215,463.88 rows=2,092,334,882 width=2,303) (actual rows= loops=)

  • Hash Cond: (mg.brand_id = b.brand_id)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=368,646.97..97,128,839.14 rows=2,092,334,882 width=2,305) (actual rows= loops=)

  • Hash Cond: (c.marketing_group_id = mg.marketing_group_id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=368,629.10..91,617,170.88 rows=2,092,334,882 width=2,297) (actual rows= loops=)

  • Hash Cond: (qa.qa_room_id = qr2.qa_room_id)
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=368,616.17..86,008,392.76 rows=2,092,334,882 width=2,269) (actual rows= loops=)

  • Hash Cond: (c.actor_id = act.actor_id)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=368,427.38..80,510,951.45 rows=2,092,334,882 width=2,069) (actual rows= loops=)

  • Hash Cond: (s.advertiser_unit_id = adv.advertiser_unit_id)
6. 0.000 0.000 ↓ 0.0

Merge Join (cost=368,406.80..74,969,025.81 rows=2,092,334,882 width=1,941) (actual rows= loops=)

  • Merge Cond: (p.prospect_id = c.prospect_id)
7. 0.000 0.000 ↓ 0.0

Merge Join (cost=375.38..10,021,330.38 rows=94,637,104 width=102) (actual rows= loops=)

  • Merge Cond: (p.prospect_id = pd.prospect_id)
8. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_prospects on prospects p (cost=0.57..2,455,995.07 rows=94,547,408 width=4) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using idx_prospect_data_prospect_id on prospect_data pd (cost=0.57..6,149,565.62 rows=94,637,104 width=98) (actual rows= loops=)

  • Filter: active
10. 0.000 0.000 ↓ 0.0

Materialize (cost=3,178.55..39,575,910.61 rows=2,090,351,790 width=1,851) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3,178.55..34,350,031.13 rows=2,090,351,790 width=1,851) (actual rows= loops=)

  • Join Filter: (s.call_id = c.call_id)
12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3,001.72..2,982,714.07 rows=499,845 width=1,655) (actual rows= loops=)

  • Join Filter: (rv.call_id = c.call_id)
13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,001.72..2,969,482.39 rows=705 width=1,643) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,001.44..2,968,286.41 rows=705 width=1,451) (actual rows= loops=)

  • Join Filter: (rv_orig.call_id = c.call_id)
15. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,001.44..2,962,545.76 rows=1 width=1,447) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,001.16..2,962,537.45 rows=1 width=1,251) (actual rows= loops=)

  • Join Filter: (qa.call_id = c.call_id)
17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,000.73..2,962,528.99 rows=1 width=194) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Gather Merge (cost=1,000.59..2,962,520.77 rows=1 width=52) (actual rows= loops=)

  • Workers Planned: 2
19. 0.000 0.000 ↓ 0.0

Parallel Index Scan using idx_calls_prospect_id_2 on calls c (cost=0.56..2,961,520.63 rows=1 width=52) (actual rows= loops=)

  • Filter: (call_id = 210,601,315)
20. 0.000 0.000 ↓ 0.0

Index Scan using pk_dispositions on dispositions dis (cost=0.14..8.16 rows=1 width=150) (actual rows= loops=)

  • Index Cond: (disposition_id = c.disposition_id)
21. 0.000 0.000 ↓ 0.0

Index Scan using idx_qa_call_id on qa (cost=0.43..8.45 rows=1 width=1,065) (actual rows= loops=)

  • Index Cond: (call_id = 210,601,315)
22. 0.000 0.000 ↓ 0.0

Index Scan using pk_actors on actors act2 (cost=0.28..8.29 rows=1 width=200) (actual rows= loops=)

  • Index Cond: (actor_id = qa.lock_actor_id)
23. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.00..5,731.84 rows=705 width=12) (actual rows= loops=)

  • Workers Planned: 1
24. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on qa_reviews rv_orig (cost=0.00..4,661.34 rows=415 width=12) (actual rows= loops=)

  • Filter: (original AND (score IS NOT NULL) AND (call_id = 210,601,315))
25. 0.000 0.000 ↓ 0.0

Index Scan using pk_actors on actors act1 (cost=0.28..1.70 rows=1 width=200) (actual rows= loops=)

  • Index Cond: (actor_id = rv_orig.actor_id)
26. 0.000 0.000 ↓ 0.0

Materialize (cost=1,000.00..5,735.78 rows=709 width=20) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.00..5,732.24 rows=709 width=20) (actual rows= loops=)

  • Workers Planned: 1
28. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on qa_reviews rv (cost=0.00..4,661.34 rows=417 width=20) (actual rows= loops=)

  • Filter: (newest AND (call_id = 210,601,315))
29. 0.000 0.000 ↓ 0.0

Materialize (cost=176.84..12,050.66 rows=4,182 width=212) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on sales s (cost=176.84..12,029.75 rows=4,182 width=212) (actual rows= loops=)

  • Recheck Cond: (call_id = 210,601,315)
31. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_sales_call_id (cost=0.00..175.79 rows=4,182 width=0) (actual rows= loops=)

  • Index Cond: (call_id = 210,601,315)
32. 0.000 0.000 ↓ 0.0

Hash (cost=14.70..14.70 rows=470 width=128) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on advertiser_units adv (cost=0.00..14.70 rows=470 width=128) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Hash (cost=171.13..171.13 rows=1,413 width=204) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on actors act (cost=0.00..171.13 rows=1,413 width=204) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Hash (cost=11.30..11.30 rows=130 width=36) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Seq Scan on qa_rooms2 qr2 (cost=0.00..11.30 rows=130 width=36) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Hash (cost=13.50..13.50 rows=350 width=12) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Seq Scan on marketing_groups mg (cost=0.00..13.50 rows=350 width=12) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Hash (cost=14.30..14.30 rows=430 width=150) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Seq Scan on brands b (cost=0.00..14.30 rows=430 width=150) (actual rows= loops=)