explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZRmy

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

Limit (cost=9,183,847.25..22,619,674.33 rows=1 width=869) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,183,847.25..22,619,674.33 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,183,846.68..22,619,667.64 rows=1 width=3,000) (actual rows= loops=)

  • Join Filter: (ue.user_email_history_id = ueh.id)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,183,846.68..22,499,688.50 rows=1 width=2,985) (actual rows= loops=)

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

Nested Loop Left Join (cost=9,183,846.68..22,403,301.63 rows=1 width=2,985) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,183,846.12..22,403,295.14 rows=1 width=2,976) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,183,845.56..22,403,288.67 rows=1 width=1,951) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,183,845.00..22,403,282.19 rows=1 width=1,922) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,183,844.43..22,403,274.09 rows=1 width=1,910) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,183,843.73..22,403,265.38 rows=1 width=1,823) (actual rows= loops=)

  • Join Filter: (os.id = d.offer_source_id)
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,183,843.73..22,403,264.22 rows=1 width=1,804) (actual rows= loops=)

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

Nested Loop Left Join (cost=9,183,843.73..22,403,263.11 rows=1 width=1,807) (actual rows= loops=)

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

Nested Loop Left Join (cost=9,183,843.73..22,301,904.50 rows=1 width=1,805) (actual rows= loops=)

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

Nested Loop (cost=9,183,843.73..22,301,903.36 rows=1 width=1,804) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,183,843.17..22,301,896.87 rows=1 width=1,231) (actual rows= loops=)

  • Join Filter: (da.deposit_id = one_cte.deposit_id)
16. 0.000 0.000 ↓ 0.0

Gather (cost=9,183,842.74..20,989,243.01 rows=413,868 width=1,202) (actual rows= loops=)

  • Workers Planned: 2
17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,182,842.74..20,946,856.21 rows=172,445 width=1,202) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=9,182,842.30..19,622,158.41 rows=208,788 width=996) (actual rows= loops=)

  • Hash Cond: ((dmfd.deposit_adjustment_uuid)::text = (da.deposit_adjustment_uuid)::text)
19. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,859,258.19..16,795,486.57 rows=596,263 width=972) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,859,257.62..13,348,581.39 rows=531,702 width=951) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,859,257.06..9,734,348.87 rows=538,980 width=164) (actual rows= loops=)

  • Hash Cond: (w_account.account_owner_id = w_owner.id)
22. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,513,627.58..9,295,707.57 rows=538,980 width=126) (actual rows= loops=)

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

Hash Join (cost=5,634,798.90..8,303,774.37 rows=1,830,672 width=122) (actual rows= loops=)

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

Parallel Seq Scan on transactions w_transaction (cost=0.00..2,412,692.50 rows=47,595,250 width=32) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=5,607,336.38..5,607,336.38 rows=2,197,002 width=90) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=2,496,109.78..5,607,336.38 rows=2,197,002 width=90) (actual rows= loops=)

  • Merge Cond: (w_it_parent.id = ita.adjusts_initiating_transaction_id)
27. 0.000 0.000 ↓ 0.0

Index Scan using initiating_transactions_pkey on initiating_transactions w_it_parent (cost=0.56..2,939,012.25 rows=57,119,379 width=45) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Sort (cost=2,492,570.65..2,498,063.15 rows=2,197,002 width=61) (actual rows= loops=)

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

Hash Join (cost=1,573,781.92..2,261,148.29 rows=2,197,002 width=61) (actual rows= loops=)

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

Hash Right Join (cost=308,178.33..817,387.96 rows=4,145,808 width=69) (actual rows= loops=)

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

Seq Scan on initiating_transaction_adjustments ita (cost=0.00..447,405.87 rows=23,544,287 width=16) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash (cost=256,355.73..256,355.73 rows=4,145,808 width=61) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Index Scan using idx_initiating_transaction_created_at on initiating_transactions it (cost=0.56..256,355.73 rows=4,145,808 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))
34. 0.000 0.000 ↓ 0.0

Hash (cost=971,159.90..971,159.90 rows=17,947,015 width=8) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on initiating_transactions_source its (cost=0.00..971,159.90 rows=17,947,015 width=8) (actual rows= loops=)

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

Hash (cost=752,359.51..752,359.51 rows=6,888,494 width=20) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on accounts w_account (cost=191,847.63..752,359.51 rows=6,888,494 width=20) (actual rows= loops=)

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

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

  • Index Cond: ((account_type)::text = 'PENDING_DEPOSIT'::text)
39. 0.000 0.000 ↓ 0.0

Hash (cost=182,393.10..182,393.10 rows=7,331,310 width=54) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

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

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.71 rows=1 width=803) (actual rows= loops=)

  • Index Cond: (id = it.metadata_id)
42. 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)
43. 0.000 0.000 ↓ 0.0

Hash (cost=1,607,788.94..1,607,788.94 rows=30,797,214 width=61) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Seq Scan on deposit_adjustments da (cost=0.00..1,607,788.94 rows=30,797,214 width=61) (actual rows= loops=)

  • Filter: ((wallet_status)::text = 'PENDING'::text)
45. 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=)

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

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

  • Filter: (d.id = one_cte.deposit_id)
47. 0.000 0.000 ↓ 0.0

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

48. 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=)

  • Index Cond: (deposit_id = d.id)
49. 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=)

  • Index Cond: ((deposit_uuid)::text = (d.deposit_uuid)::text)
50. 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=)

51. 0.000 0.000 ↓ 0.0

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

52. 0.000 0.000 ↓ 0.0

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

53. 0.000 0.000 ↓ 0.0

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

54. 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=)

  • Index Cond: ((event_id)::text = (one_cte.cte_event_id)::text)
  • Filter: ((card_network)::text = ANY ('{VISA,MASTERCARD,AMEX,PAYPAL}'::text[]))
55. 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.68 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[]))
56. 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)
57. 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)
58. 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)
59. 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=)

60. 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=)

61. 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=)

  • Index Cond: (wallet_payout_id = (it.initiating_transaction_uuid)::bpchar)