explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ERHN

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

Nested Loop (cost=1,203.54..28,277.76 rows=1 width=227) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,203.54..28,237.34 rows=1 width=326) (actual rows= loops=)

  • Join Filter: (an.id = message_metrics.analysis_id)
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,203.12..28,236.62 rows=1 width=315) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,202.83..28,236.26 rows=1 width=205) (actual rows= loops=)

  • Join Filter: (best_combinations.analysis_id = an.id)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,202.54..28,235.91 rows=1 width=205) (actual rows= loops=)

  • Join Filter: (pq.start_date = fiscal_dates.actual_date)
6. 0.000 0.000 ↓ 0.0

Index Scan using index_fiscal_dates_on_account_id on fiscal_dates (cost=0.28..4.30 rows=1 width=38) (actual rows= loops=)

  • Index Cond: (account_id = 35)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,202.26..28,172.98 rows=4,690 width=171) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,201.97..25,396.65 rows=2,105 width=148) (actual rows= loops=)

  • Hash Cond: (an.performance_query_id = pq.id)
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=960.69..25,149.85 rows=2,105 width=140) (actual rows= loops=)

  • Hash Cond: (gr.workspace_id = wk.id)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=112.42..24,237.47 rows=11,481 width=40) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on analyses an (cost=111.67..615.92 rows=4,925 width=32) (actual rows= loops=)

  • Recheck Cond: (response_action_id = '14'::bigint)
  • Filter: approved_for_reporting
12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_25088_index_analyses_on_response_action_id (cost=0.00..110.44 rows=5,620 width=0) (actual rows= loops=)

  • Index Cond: (response_action_id = '14'::bigint)
13. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on grammars gr (cost=0.75..4.78 rows=2 width=24) (actual rows= loops=)

  • Recheck Cond: ((id = an.grammar_id) OR (grammar_container_id = an.grammar_id))
14. 0.000 0.000 ↓ 0.0

BitmapOr (cost=0.75..0.75 rows=2 width=0) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_25557_primary (cost=0.00..0.37 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (id = an.grammar_id)
16. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_25557_index_grammars_on_grammar_container_id (cost=0.00..0.37 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (grammar_container_id = an.grammar_id)
17. 0.000 0.000 ↓ 0.0

Hash (cost=830.64..830.64 rows=1,411 width=108) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=558.44..830.64 rows=1,411 width=108) (actual rows= loops=)

  • Hash Cond: (wk.channel_id = ch.id)
19. 0.000 0.000 ↓ 0.0

Hash Join (cost=556.83..824.75 rows=1,411 width=76) (actual rows= loops=)

  • Hash Cond: (wk.experiment_id = exp.id)
20. 0.000 0.000 ↓ 0.0

Seq Scan on sensei_workspaces wk (cost=0.00..224.95 rows=7,695 width=37) (actual rows= loops=)

  • Filter: ((NOT exclude_from_reporting) AND (NOT control_only_workspace))
21. 0.000 0.000 ↓ 0.0

Hash (cost=544.29..544.29 rows=1,003 width=47) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash Join (cost=36.15..544.29 rows=1,003 width=47) (actual rows= loops=)

  • Hash Cond: (exp.campaign_id = cmp.id)
  • Join Filter: ((cmp.channel_id = '2'::bigint) OR (exp.sensei_channel_id = '2'::bigint))
23. 0.000 0.000 ↓ 0.0

Seq Scan on sensei_experiments exp (cost=0.00..493.71 rows=5,468 width=40) (actual rows= loops=)

  • Filter: (adaptive_algorithm IS NOT TRUE)
24. 0.000 0.000 ↓ 0.0

Hash (cost=33.86..33.86 rows=183 width=31) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on campaigns cmp (cost=0.00..33.86 rows=183 width=31) (actual rows= loops=)

  • Filter: (client_id = 285)
26. 0.000 0.000 ↓ 0.0

Hash (cost=1.27..1.27 rows=27 width=40) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on channels ch (cost=0.00..1.27 rows=27 width=40) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=166.64..166.64 rows=5,971 width=16) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on performance_queries pq (cost=0.00..166.64 rows=5,971 width=16) (actual rows= loops=)

  • Filter: (start_date <= '2020-07-01 00:00:00'::timestamp without time zone)
30. 0.000 0.000 ↓ 0.0

Index Scan using idx_25659_index_messages_on_grammar_id on messages (cost=0.29..1.20 rows=12 width=39) (actual rows= loops=)

  • Index Cond: (grammar_id = gr.id)
31. 0.000 0.000 ↓ 0.0

Index Scan using idx_25103_combination_idx on best_combinations (cost=0.29..0.34 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (message_id = messages.id)
  • Filter: (type = 'BestObservation'::text)
32. 0.000 0.000 ↓ 0.0

Index Scan using idx_25557_primary on grammars persago_message_grammars (cost=0.29..0.36 rows=1 width=126) (actual rows= loops=)

  • Index Cond: (messages.message_grammar_id = id)
  • Filter: is_persado_message
33. 0.000 0.000 ↓ 0.0

Index Scan using idx_25674_index_message_metrics_on_message_id_and_analysis_id on message_metrics (cost=0.42..0.67 rows=4 width=27) (actual rows= loops=)

  • Index Cond: (message_id = messages.id)
34. 0.000 0.000 ↓ 0.0

Seq Scan on response_actions (cost=0.00..4.66 rows=1 width=18) (actual rows= loops=)

  • Filter: (id = '14'::bigint)
35.          

SubPlan (for Nested Loop)

36. 0.000 0.000 ↓ 0.0

Aggregate (cost=35.72..35.73 rows=1 width=32) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.86..35.72 rows=1 width=6) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Hash Join (cost=10.44..15.63 rows=2 width=8) (actual rows= loops=)

  • Hash Cond: (response_actions_1.id = analyses.response_action_id)
39. 0.000 0.000 ↓ 0.0

Seq Scan on response_actions response_actions_1 (cost=0.00..4.66 rows=82 width=8) (actual rows= loops=)

  • Filter: (kind <> ALL ('{calculated,independent}'::text[]))
40. 0.000 0.000 ↓ 0.0

Hash (cost=10.40..10.40 rows=3 width=16) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Index Scan using idx_25088_index_analyses_on_performance_query_id on analyses (cost=0.29..10.40 rows=3 width=16) (actual rows= loops=)

  • Index Cond: (performance_query_id = pq.id)
42. 0.000 0.000 ↓ 0.0

Index Scan using idx_25674_index_message_metrics_on_message_id_and_analysis_id on message_metrics mm2 (cost=0.42..8.44 rows=1 width=14) (actual rows= loops=)

  • Index Cond: ((message_id = message_metrics.message_id) AND (analysis_id = analyses.id))