explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 97NHd

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

Limit (cost=9,176,405.57..22,659,229.23 rows=1 width=869) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,176,405.57..22,659,229.23 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,176,405.01..22,659,222.54 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,176,405.01..22,539,243.40 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,176,405.01..22,442,856.53 rows=1 width=2,985) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,176,404.45..22,442,850.04 rows=1 width=2,976) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,176,403.89..22,442,843.57 rows=1 width=1,951) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,176,403.32..22,442,837.09 rows=1 width=1,922) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,176,402.75..22,442,829.00 rows=1 width=1,910) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,176,402.05..22,442,820.28 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,176,402.05..22,442,819.12 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,176,402.05..22,442,818.01 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,176,402.05..22,341,476.22 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,176,402.05..22,341,475.09 rows=1 width=1,804) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,176,401.49..22,341,468.60 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,176,401.06..21,021,332.76 rows=416,227 width=1,202) (actual rows= loops=)

  • Workers Planned: 2
17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,175,401.06..20,978,710.06 rows=173,428 width=1,202) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=9,175,400.62..19,646,622.88 rows=209,978 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,851,875.05..16,819,037.47 rows=599,662 width=972) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,851,874.48..13,352,914.53 rows=534,733 width=951) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,851,873.92..9,723,656.30 rows=541,361 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,506,246.95..9,284,923.26 rows=541,361 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,627,434.20..8,292,685.77 rows=1,838,759 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,409,229.32 rows=47,526,932 width=32) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=5,599,852.51..5,599,852.51 rows=2,206,535 width=90) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=2,493,185.33..5,599,852.51 rows=2,206,535 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,934,520.56 rows=57,032,933 width=45) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Sort (cost=2,489,651.59..2,495,167.93 rows=2,206,535 width=61) (actual rows= loops=)

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

Hash Join (cost=1,571,163.72..2,257,156.16 rows=2,206,535 width=61) (actual rows= loops=)

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

Hash Right Join (cost=309,504.78..817,131.25 rows=4,163,797 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..446,014.87 rows=23,471,087 width=16) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash (cost=257,457.32..257,457.32 rows=4,163,797 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..257,457.32 rows=4,163,797 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=968,308.16..968,308.16 rows=17,880,382 width=8) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on initiating_transactions_source its (cost=0.00..968,308.16 rows=17,880,382 width=8) (actual rows= loops=)

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

Hash (cost=752,345.91..752,345.91 rows=6,888,387 width=20) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on accounts w_account (cost=191,842.74..752,345.91 rows=6,888,387 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,120.65 rows=7,311,478 width=0) (actual rows= loops=)

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

Hash (cost=182,391.43..182,391.43 rows=7,331,243 width=54) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Seq Scan on account_owners w_owner (cost=0.00..182,391.43 rows=7,331,243 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.70 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,748.16..1,607,748.16 rows=30,796,433 width=61) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Seq Scan on deposit_adjustments da (cost=0.00..1,607,748.16 rows=30,796,433 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,427.46 rows=3,433,146 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.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[]))
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 idx_users_cognito_id 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)