explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cgLP

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

Limit (cost=9,165,349.36..22,701,457.94 rows=1 width=869) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,349.36..22,701,457.94 rows=1 width=869) (actual rows= loops=)

  • Filter: (clo.id IS NULL)
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,348.80..22,701,451.25 rows=1 width=3,000) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Index Scan using card_linked_offer_fulfillments_ux1 on card_linked_offer_fulfillments clo (cost=0.56..6.63 rows=1 width=41) (actual rows= loops=)

  • Join Filter: (ue.user_email_history_id = ueh.id)
  • Index Cond: (wallet_payout_id = (it.initiating_transaction_uuid)::bpchar)
5. 0.000 0.000 ↓ 0.0

Seq Scan on user_email_history ueh (cost=0.00..77,594.06 rows=3,390,806 width=31) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,348.80..22,581,472.11 rows=1 width=2,985) (actual rows= loops=)

  • Join Filter: (ue.user_id = usr.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on user_email ue (cost=0.00..54,674.72 rows=3,336,972 width=16) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,348.80..22,485,085.24 rows=1 width=2,985) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,348.24..22,485,078.75 rows=1 width=2,976) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using users_idx1 on users usr (cost=0.56..6.48 rows=1 width=100) (actual rows= loops=)

  • Index Cond: ((cognito_id)::text = (w_owner.owner_id)::text)
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,347.68..22,485,072.28 rows=1 width=1,951) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using cards_pkey on cards c (cost=0.56..6.47 rows=1 width=1,062) (actual rows= loops=)

  • Index Cond: ((card_id)::text = (d.dosh_card_id)::text)
13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,165,347.11..22,485,065.80 rows=1 width=1,922) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using idx_cte_venue_uuids_card_transaction_event_id on card_transaction_events_venue_uuids ctevu (cost=0.56..6.47 rows=1 width=45) (actual rows= loops=)

  • Index Cond: (card_transaction_event_id = cte.id)
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,165,346.54..22,485,057.71 rows=1 width=1,910) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using idx_cte_card_network_ids_card_transaction_event_id on card_transaction_events_card_network_ids ctecnid (cost=0.57..7.67 rows=42 width=20) (actual rows= loops=)

  • Index Cond: (card_transaction_event_id = cte.id)
  • Filter: ((card_network_external_id_type)::text <> ALL ('{VMID,XID,BRAND}'::text[]))
17. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,345.85..22,485,048.99 rows=1 width=1,823) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using card_transaction_events_ix6 on card_transaction_events cte (cost=0.70..8.72 rows=1 width=124) (actual rows= loops=)

  • Join Filter: (os.id = d.offer_source_id)
  • Index Cond: ((event_id)::text = (one_cte.cte_event_id)::text)
  • Filter: ((card_network)::text = ANY ('{VISA,MASTERCARD,AMEX,PAYPAL}'::text[]))
19. 0.000 0.000 ↓ 0.0

Seq Scan on offer_sources os (cost=0.00..1.07 rows=7 width=23) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,345.85..22,485,047.84 rows=1 width=1,804) (actual rows= loops=)

  • Join Filter: (dm.id = d.marketplace_id)
21. 0.000 0.000 ↓ 0.0

Seq Scan on marketplace dm (cost=0.00..1.05 rows=5 width=13) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,345.85..22,485,046.72 rows=1 width=1,807) (actual rows= loops=)

  • Join Filter: (dacq.deposit_id = d.id)
23. 0.000 0.000 ↓ 0.0

Seq Scan on deposit_acquisitions dacq (cost=0.00..58,415.33 rows=3,432,433 width=18) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,165,345.85..22,383,725.98 rows=1 width=1,805) (actual rows= loops=)

  • Join Filter: (d.payment_method_entry_type_enum_id = pmete.id)
25. 0.000 0.000 ↓ 0.0

Seq Scan on payment_method_entry_type_enum pmete (cost=0.00..1.06 rows=6 width=17) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,165,345.85..22,383,724.85 rows=1 width=1,804) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,165,345.28..22,383,718.35 rows=1 width=1,231) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using idx_deposits_json_text_deposit_uuid on ""Deposits_json_text"" djt (cost=0.56..6.48 rows=1 width=610) (actual rows= loops=)

  • Join Filter: (da.deposit_id = one_cte.deposit_id)
  • Index Cond: ((deposit_uuid)::text = (d.deposit_uuid)::text)
29. 0.000 0.000 ↓ 0.0

Subquery Scan on one_cte (cost=0.43..3.16 rows=1 width=45) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Gather (cost=9,165,344.85..21,055,317.14 rows=418,833 width=1,202) (actual rows= loops=)

  • Workers Planned: 2
  • Filter: (d.id = one_cte.deposit_id)
31. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,164,344.85..21,012,433.84 rows=174,514 width=1,202) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Limit (cost=0.43..3.15 rows=1 width=53) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Index Scan using idx_deposit_cte_metadata_deposit_id on deposit_card_transaction_event_metadata dctem (cost=0.43..8.58 rows=3 width=53) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Index Scan using ""Deposits_pkey"" on ""Deposits"" d (cost=0.44..6.34 rows=1 width=206) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash Join (cost=9,164,344.41..19,672,174.58 rows=211,293 width=996) (actual rows= loops=)

  • Index Cond: (id = da.deposit_id)
  • Index Cond: (deposit_id = d.id)
  • Hash Cond: ((dmfd.deposit_adjustment_uuid)::text = (da.deposit_adjustment_uuid)::text)
  • Filter: ((status)::text <> ALL ('{SHADOW,REPLICATED}'::text[]))
36. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,840,872.99..16,843,565.28 rows=603,417 width=972) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=1,607,710.93..1,607,710.93 rows=30,795,720 width=61) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on deposit_adjustments da (cost=0.00..1,607,710.93 rows=30,795,720 width=61) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,840,872.42..13,356,168.13 rows=538,081 width=951) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Index Scan using deposit_marketplace_fulfillment_details_idx1 on deposit_marketplace_fulfillment_details dmfd (cost=0.56..6.47 rows=1 width=45) (actual rows= loops=)

  • Index Cond: (initiating_transaction_id = w_transaction.initiating_transaction_id)
  • Filter: ((wallet_status)::text = 'PENDING'::text)
41. 0.000 0.000 ↓ 0.0

Index Scan using initiating_transactions_metadata_json_text_pkey on initiating_transactions_metadata_json_text itmjt (cost=0.56..6.70 rows=1 width=803) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,840,871.86..9,709,611.96 rows=544,090 width=164) (actual rows= loops=)

  • Index Cond: (id = it.metadata_id)
  • Hash Cond: (w_account.account_owner_id = w_owner.id)
43. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,495,251.93..9,270,778.79 rows=544,090 width=126) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Hash (cost=182,388.08..182,388.08 rows=7,331,108 width=54) (actual rows= loops=)

  • Hash Cond: (w_transaction.account_id = w_account.id)
45. 0.000 0.000 ↓ 0.0

Seq Scan on account_owners w_owner (cost=0.00..182,388.08 rows=7,331,108 width=54) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Hash Join (cost=5,616,450.08..8,278,183.88 rows=1,848,025 width=122) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Hash (cost=752,336.34..752,336.34 rows=6,888,280 width=20) (actual rows= loops=)

  • Hash Cond: (w_transaction.initiating_transaction_id = it.id)
48. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on transactions w_transaction (cost=0.00..2,405,943.03 rows=47,462,103 width=32) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Hash (cost=5,588,731.46..5,588,731.46 rows=2,217,490 width=90) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on accounts w_account (cost=191,841.87..752,336.34 rows=6,888,280 width=20) (actual rows= loops=)

  • Recheck Cond: ((account_type)::text = 'PENDING_DEPOSIT'::text)
  • Filter: ((account_name)::text = 'PRIMARY_WALLET'::text)
51. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=2,491,971.36..5,588,731.46 rows=2,217,490 width=90) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on accounts_idx2 (cost=0.00..190,119.80 rows=7,311,365 width=0) (actual rows= loops=)

  • Merge Cond: (w_it_parent.id = ita.adjusts_initiating_transaction_id)
  • Index Cond: ((account_type)::text = 'PENDING_DEPOSIT'::text)
53. 0.000 0.000 ↓ 0.0

Sort (cost=2,488,442.74..2,493,986.47 rows=2,217,490 width=61) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Index Scan using initiating_transactions_pkey on initiating_transactions w_it_parent (cost=0.56..2,930,260.38 rows=56,950,921 width=45) (actual rows= loops=)

  • Sort Key: ita.adjusts_initiating_transaction_id
55. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,569,892.62..2,254,713.79 rows=2,217,490 width=61) (actual rows= loops=)

  • Hash Cond: (it.transaction_source_id = its.id)
56. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=311,033.78..817,105.72 rows=4,184,470 width=69) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Hash (cost=966,159.11..966,159.11 rows=17,840,698 width=8) (actual rows= loops=)

  • Hash Cond: (ita.initiating_transaction_id = it.id)
58. 0.000 0.000 ↓ 0.0

Seq Scan on initiating_transactions_source its (cost=0.00..966,159.11 rows=17,840,698 width=8) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Seq Scan on initiating_transaction_adjustments ita (cost=0.00..444,653.61 rows=23,397,461 width=16) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Hash (cost=258,727.90..258,727.90 rows=4,184,470 width=61) (actual rows= loops=)

  • Filter: ((qualifier_id)::text = 'DOSHBACK'::text)
61. 0.000 0.000 ↓ 0.0

Index Scan using idx_initiating_transaction_created_at on initiating_transactions it (cost=0.56..258,727.90 rows=4,184,470 width=61) (actual rows= loops=)

  • Index Cond: ((created_at >= '2020-09-01 21:09:07.445866'::timestamp without time zone) AND (created_at <= '2020-09-02 21:08:23.598098'::timestamp without time zone))