explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7Dd

Settings
# exclusive inclusive rows x rows loops node
1. 5.128 47,827.501 ↑ 1.0 1 1

Aggregate (cost=30,095.91..30,095.92 rows=1 width=8) (actual time=47,827.500..47,827.501 rows=1 loops=1)

2. 8.698 47,822.373 ↓ 9.6 5,480 1

Nested Loop Left Join (cost=4,895.67..30,094.49 rows=568 width=8) (actual time=3,975.423..47,822.373 rows=5,480 loops=1)

3. 7.212 47,802.715 ↓ 9.6 5,480 1

Nested Loop Left Join (cost=4,895.25..27,161.27 rows=568 width=12) (actual time=3,975.416..47,802.715 rows=5,480 loops=1)

4. 3.639 47,784.543 ↓ 9.6 5,480 1

Nested Loop Left Join (cost=4,894.82..22,571.99 rows=568 width=12) (actual time=3,975.407..47,784.543 rows=5,480 loops=1)

5. 3.796 47,764.464 ↓ 9.6 5,480 1

Nested Loop Left Join (cost=4,894.40..19,638.77 rows=568 width=16) (actual time=3,975.378..47,764.464 rows=5,480 loops=1)

6. 9.465 47,744.228 ↓ 9.6 5,480 1

Nested Loop Left Join (cost=4,893.97..15,049.49 rows=568 width=12) (actual time=3,975.367..47,744.228 rows=5,480 loops=1)

7. 22.650 47,690.923 ↓ 9.6 5,480 1

Nested Loop Left Join (cost=4,893.55..11,780.50 rows=568 width=16) (actual time=3,975.306..47,690.923 rows=5,480 loops=1)

8. 42,273.959 46,199.633 ↓ 9.6 5,480 1

Bitmap Heap Scan on payment_transactions (cost=4,893.12..7,191.22 rows=568 width=16) (actual time=3,932.532..46,199.633 rows=5,480 loops=1)

  • Recheck Cond: (((account_id = 212) AND (state = ANY ('{2,3}'::integer[])) AND (state = ANY ('{2,3}'::integer[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[]))) OR ((state = ANY ('{2,3}'::integer[])) AND (state = ANY ('{2,3}'::integer[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])) AND (payment_profile_id = ANY ('{34092,50024,71043,175340,277276,262184,271979,272056,273160,274642,275512,275345,276188,276393,275908,277130,277287,287060,277738,298969,299896,272087,276220,265245,283743,285186,283592,306060,311113,321679,342806,439387,446529,477012,501115,788387,838554,869520,870246,879703,991792,1066418,1430651,1432235,1467508,1523274,1551340,1551337,1594268,1604854,1633319,1633322,1656886,1703018,1728179,1743732,1902533,1904405,1922627,1954534,2030965,2077600,2156966,2162170,2169218,2169213}'::integer[]))))
  • Filter: ((state = ANY ('{2,3}'::integer[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])) AND (state = ANY ('{2,3}'::integer[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])))
  • Heap Blocks: exact=5,536
9. 0.002 3,925.674 ↓ 0.0 0 1

BitmapOr (cost=4,893.12..4,893.12 rows=568 width=0) (actual time=3,925.674..3,925.674 rows=0 loops=1)

10. 1,740.068 1,740.068 ↓ 48.0 5,475 1

Bitmap Index Scan on idx_paytrans_eqx2 (cost=0.00..74.92 rows=114 width=0) (actual time=1,740.068..1,740.068 rows=5,475 loops=1)

  • Index Cond: ((account_id = 212) AND (state = ANY ('{2,3}'::integer[])) AND (state = ANY ('{2,3}'::integer[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])))
11. 2,185.604 2,185.604 ↓ 14.0 6,366 1

Bitmap Index Scan on idx_paytrans_eqx4 (cost=0.00..4,817.92 rows=454 width=0) (actual time=2,185.604..2,185.604 rows=6,366 loops=1)

  • Index Cond: ((state = ANY ('{2,3}'::integer[])) AND (state = ANY ('{2,3}'::integer[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])) AND ((payment_type)::text = ANY ('{ecv,edc}'::text[])) AND (payment_profile_id = ANY ('{34092,50024,71043,175340,277276,262184,271979,272056,273160,274642,275512,275345,276188,276393,275908,277130,277287,287060,277738,298969,299896,272087,276220,265245,283743,285186,283592,306060,311113,321679,342806,439387,446529,477012,501115,788387,838554,869520,870246,879703,991792,1066418,1430651,1432235,1467508,1523274,1551340,1551337,1594268,1604854,1633319,1633322,1656886,1703018,1728179,1743732,1902533,1904405,1922627,1954534,2030965,2077600,2156966,2162170,2169218,2169213}'::integer[])))
12. 1,468.640 1,468.640 ↑ 1.0 1 5,480

Index Only Scan using idx_payprof_eqx1 on payment_profiles (cost=0.43..8.07 rows=1 width=4) (actual time=0.268..0.268 rows=1 loops=5,480)

  • Index Cond: ((id = payment_transactions.payment_profile_id) AND (deleted_at IS NULL))
  • Heap Fetches: 5,356
13. 43.840 43.840 ↑ 1.0 1 5,480

Index Scan using idx_vouchprof_eqx1 on voucher_profiles (cost=0.42..5.75 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=5,480)

  • Index Cond: ((payment_profile_id = payment_profiles.id) AND (deleted_at IS NULL))
14. 16.440 16.440 ↑ 1.0 1 5,480

Index Only Scan using idx_payprof_eqx1 on payment_profiles payment_profiles_payment_transactions_join (cost=0.43..8.07 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=5,480)

  • Index Cond: ((id = payment_transactions.payment_profile_id) AND (deleted_at IS NULL))
  • Heap Fetches: 5,356
15. 16.440 16.440 ↑ 1.0 1 5,480

Index Only Scan using idx_vouchprof_eqx1 on voucher_profiles voucher_profiles_payment_transactions (cost=0.42..5.15 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=5,480)

  • Index Cond: ((payment_profile_id = payment_profiles_payment_transactions_join.id) AND (deleted_at IS NULL))
  • Heap Fetches: 4,739
16. 10.960 10.960 ↑ 1.0 1 5,480

Index Only Scan using idx_payprof_eqx1 on payment_profiles payment_profiles_payment_transactions_join_2 (cost=0.43..8.07 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=5,480)

  • Index Cond: ((id = payment_transactions.payment_profile_id) AND (deleted_at IS NULL))
  • Heap Fetches: 5,356
17. 10.960 10.960 ↑ 1.0 1 5,480

Index Only Scan using idx_vouchprof_eqx1 on voucher_profiles voucher_profiles_payment_transactions_join (cost=0.42..5.15 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=5,480)

  • Index Cond: ((payment_profile_id = payment_profiles_payment_transactions_join_2.id) AND (deleted_at IS NULL))
  • Heap Fetches: 4,739
Planning time : 2,298.078 ms
Execution time : 47,827.749 ms