explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d47I

Settings
# exclusive inclusive rows x rows loops node
1. 1,035.483 36,932.468 ↓ 36.1 946,917 1

Finalize GroupAggregate (cost=1,624,464.49..1,630,407.00 rows=26,232 width=373) (actual time=35,168.865..36,932.468 rows=946,917 loops=1)

  • Group Key: w.transaction_wallet_id, w.transaction_created_date, w.orderid, ac.type_id, w.wallet_transaction_status, m.status, m.account, (split_part((ac.type)::text, '-'::text, 1)), ac.type, w.payment_id_ch, t.statusid, p.payment_statusid, t.creation_date, p.created_date, t.main_card_type, ((t.wallet_amount / t.currency_rate)), ((t.creditcard_amount / t.currency_rate)), ((t.extra_charge_summa / t.currency_rate)), ((t.financing_summa / t.currency_rate)), ((t.pay_summa / t.currency_rate)), ((t.pin_cost / t.currency_rate)), p.payment_amount
2. 573.015 35,896.985 ↓ 36.1 946,976 1

Gather Merge (cost=1,624,464.49..1,628,046.12 rows=26,232 width=373) (actual time=35,168.856..35,896.985 rows=946,976 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
3. 150.182 35,323.970 ↓ 30.9 135,282 7 / 7

Partial GroupAggregate (cost=1,623,464.39..1,623,857.87 rows=4,372 width=373) (actual time=35,157.323..35,323.970 rows=135,282 loops=7)

  • Group Key: w.transaction_wallet_id, w.transaction_created_date, w.orderid, ac.type_id, w.wallet_transaction_status, m.status, m.account, (split_part((ac.type)::text, '-'::text, 1)), ac.type, w.payment_id_ch, t.statusid, p.payment_statusid, t.creation_date, p.created_date, t.main_card_type, ((t.wallet_amount / t.currency_rate)), ((t.creditcard_amount / t.currency_rate)), ((t.extra_charge_summa / t.currency_rate)), ((t.financing_summa / t.currency_rate)), ((t.pay_summa / t.currency_rate)), ((t.pin_cost / t.currency_rate)), p.payment_amount
4. 145.990 35,173.788 ↓ 30.9 135,285 7 / 7

Sort (cost=1,623,464.39..1,623,475.32 rows=4,372 width=344) (actual time=35,157.299..35,173.788 rows=135,285 loops=7)

  • Sort Key: w.transaction_wallet_id, w.transaction_created_date, w.orderid, ac.type_id, w.wallet_transaction_status, m.status, m.account, (split_part((ac.type)::text, '-'::text, 1)), ac.type, w.payment_id_ch, t.statusid, p.payment_statusid, t.creation_date, p.created_date, t.main_card_type, ((t.wallet_amount / t.currency_rate)), ((t.creditcard_amount / t.currency_rate)), ((t.extra_charge_summa / t.currency_rate)), ((t.financing_summa / t.currency_rate)), ((t.pay_summa / t.currency_rate)), ((t.pin_cost / t.currency_rate)), p.payment_amount
  • Sort Method: quicksort Memory: 42,354kB
5. 291.753 35,027.798 ↓ 30.9 135,285 7 / 7

Nested Loop Left Join (cost=2.27..1,623,200.01 rows=4,372 width=344) (actual time=1,118.922..35,027.798 rows=135,285 loops=7)

6. 88.881 28,512.942 ↓ 30.9 135,285 7 / 7

Nested Loop (cost=1.70..1,588,135.95 rows=4,372 width=135) (actual time=1,118.885..28,512.942 rows=135,285 loops=7)

7. 66.000 20,983.245 ↓ 29.6 135,288 7 / 7

Nested Loop (cost=1.14..1,551,968.07 rows=4,564 width=110) (actual time=1,118.869..20,983.245 rows=135,288 loops=7)

8. 101.073 17,670.343 ↓ 29.6 135,288 7 / 7

Nested Loop (cost=0.56..1,514,346.11 rows=4,564 width=98) (actual time=1,118.853..17,670.343 rows=135,288 loops=7)

9. 2,670.949 2,670.949 ↑ 1.0 135,439 7 / 7

Parallel Seq Scan on wallet w (cost=0.00..371,440.45 rows=135,814 width=49) (actual time=1,113.695..2,670.949 rows=135,439 loops=7)

  • Filter: (((account_desc)::text = ANY ('{recarga-assigned-1st-purchase-cashbacks,recarga-assigned-new-cashbacks,recarga-volatile-cashbacks}'::text[])) AND ((transaction_created_date)::date >= '2020-04-01'::date) AND ((transaction_created_date)::date >= '2020-05-15'::date))
  • Rows Removed by Filter: 626,392
10. 14,898.321 14,898.321 ↑ 1.0 1 948,075 / 7

Index Scan using transactions_orderid_idx on transactions t (cost=0.56..8.41 rows=1 width=53) (actual time=0.106..0.110 rows=1 loops=948,075)

  • Index Cond: (orderid = w.orderid)
  • Filter: (main_card_type = card_type)
  • Rows Removed by Filter: 0
11. 3,246.902 3,246.902 ↑ 1.0 1 947,013 / 7

Index Scan using movement_pkey on movement m (cost=0.57..8.24 rows=1 width=28) (actual time=0.024..0.024 rows=1 loops=947,013)

  • Index Cond: (id = w.target)
12. 7,440.816 7,440.816 ↑ 1.0 1 947,013 / 7

Index Scan using account_pkey on account ac (cost=0.56..7.92 rows=1 width=33) (actual time=0.055..0.055 rows=1 loops=947,013)

  • Index Cond: (id = m.account)
  • Filter: ((type)::text ~~ 'user%'::text)
  • Rows Removed by Filter: 0
13. 6,223.103 6,223.103 ↑ 1.0 1 946,994 / 7

Index Scan using payments__payment_id_ch_idx on payments p (cost=0.56..7.99 rows=1 width=30) (actual time=0.046..0.046 rows=1 loops=946,994)

  • Index Cond: ((w.payment_id_ch)::text = (payment_id_ch)::text)
Planning time : 13.194 ms
Execution time : 36,980.793 ms