explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4ugY

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

Nested Loop (cost=128.29..422.4 rows=1 width=191) (actual time=21.905..21.905 rows=0 loops=1)

  • Buffers: shared hit=7829
2. 0.000 21.905 ↓ 0.0 0 1

Nested Loop (cost=127.73..419.54 rows=1 width=159) (actual time=21.905..21.905 rows=0 loops=1)

  • Buffers: shared hit=7829
3. 0.001 21.905 ↓ 0.0 0 1

Nested Loop (cost=127.29..417.18 rows=1 width=151) (actual time=21.905..21.905 rows=0 loops=1)

  • Buffers: shared hit=7829
4. 0.000 21.904 ↓ 0.0 0 1

Nested Loop (cost=127..414.99 rows=1 width=159) (actual time=21.904..21.904 rows=0 loops=1)

  • Buffers: shared hit=7829
5. 0.000 21.904 ↓ 0.0 0 1

Nested Loop (cost=126.57..412.55 rows=1 width=167) (actual time=21.904..21.904 rows=0 loops=1)

  • Buffers: shared hit=7829
6. 3.677 14.066 ↓ 9,879.0 9,879 1

Nested Loop (cost=1.15..285.66 rows=1 width=159) (actual time=0.103..14.066 rows=9,879 loops=1)

  • Buffers: shared hit=7813
7. 1.083 5.094 ↓ 1,059.0 1,059 1

Nested Loop (cost=0.72..264.17 rows=1 width=154) (actual time=0.063..5.094 rows=1,059 loops=1)

  • Buffers: shared hit=3200
8. 1.893 1.893 ↓ 48.1 1,059 1

Index Scan using en_off_offer_type_id_idx on en_offer off (cost=0.43..220.24 rows=22 width=97) (actual time=0.05..1.893 rows=1,059 loops=1)

  • Index Cond: (off.offer_type_id = 3)
  • Filter: ((off.offer_status_id = 2) AND (CURRENT_TIMESTAMP >= off.offer_start_dt) AND (CURRENT_TIMESTAMP <= off.offer_end_dt))
  • Buffers: shared hit=16
9. 2.118 2.118 ↑ 1.0 1 1,059

Index Scan using en_basket_offer_offer_id on en_basket_offer bas_off (cost=0.29..1.99 rows=1 width=57) (actual time=0.002..0.002 rows=1 loops=1,059)

  • Index Cond: (bas_off.offer_id = off.offer_id)
  • Filter: (bas_off.is_bonus = 'N'::bpchar)
  • Buffers: shared hit=3184
10. 5.295 5.295 ↑ 54.1 9 1,059

Index Scan using en_off_site_offer_id_idx on en_offer_site off_site (cost=0.44..15.4 rows=487 width=21) (actual time=0.003..0.005 rows=9 loops=1,059)

  • Index Cond: (off_site.offer_id = bas_off.offer_id)
  • Buffers: shared hit=4613
11. 9.830 9.879 ↑ 22.5 2 9,879

HashAggregate (cost=125.42..125.87 rows=45 width=24) (actual time=0..0.001 rows=2 loops=9,879)

  • Group Key: ps1.promo_part_site_id, ps1.site_id, ps1.site_group_id
  • Buffers: shared hit=16
12. 0.001 0.049 ↑ 22.5 2 1

Append (cost=0.42..125.08 rows=45 width=24) (actual time=0.016..0.049 rows=2 loops=1)

  • Buffers: shared hit=16
13. 0.018 0.018 ↑ 14.0 2 1

Index Scan using en_promotion_partition_site_site_idx on en_promotion_participant_site ps1 (cost=0.42..28.61 rows=28 width=24) (actual time=0.016..0.018 rows=2 loops=1)

  • Index Cond: (ps1.site_id = 457348)
  • Buffers: shared hit=5
14. 0.001 0.030 ↓ 0.0 0 1

Nested Loop (cost=0.86..95.8 rows=17 width=24) (actual time=0.03..0.03 rows=0 loops=1)

  • Buffers: shared hit=11
15. 0.017 0.017 ↑ 2.0 2 1

Index Scan using en_site_gr_siteid_idx on en_site_group_site sgs (cost=0.43..4.15 rows=4 width=16) (actual time=0.015..0.017 rows=2 loops=1)

  • Index Cond: (sgs.site_id = 457348)
  • Buffers: shared hit=5
16. 0.012 0.012 ↓ 0.0 0 2

Index Scan using en_promotion_participant_site_site_group_id_idx on en_promotion_participant_site ps (cost=0.42..22.68 rows=23 width=16) (actual time=0.006..0.006 rows=0 loops=2)

  • Index Cond: (ps.site_group_id = sgs.site_group_id)
  • Buffers: shared hit=6
17. 0.000 0.000 ↓ 0.0 0 0

Index Scan using "idx$$_192030001" on en_site s (cost=0.43..2.45 rows=1 width=8) (never executed)

  • Index Cond: (s.site_id = ps1.site_id)
  • Filter: (s.site_type_id = ANY ('{1,3}'::bigint[]))
18. 0.000 0.000 ↓ 0.0 0 0

Index Scan using en_promotion_pk on en_promotion ep (cost=0.29..2.18 rows=1 width=8) (never executed)

  • Index Cond: (ep.promotion_id = off.promotion_id)
  • Filter: ((ep.promotion_status_id = 2) AND (CURRENT_TIMESTAMP >= ep.promotion_start_dt) AND (CURRENT_TIMESTAMP <= ep.promotion_end_dt))
19. 0.000 0.000 ↓ 0.0 0 0

Index Scan using en_reward_pk on en_reward rw (cost=0.44..2.37 rows=1 width=16) (never executed)

  • Index Cond: (rw.reward_id = bas_off.reward_id)
20. 0.000 0.000 ↓ 0.0 0 0

Index Scan using en_acc_bskt_off_account_id_idx on en_account_basket_offer acc_bas_off (cost=0.57..2.79 rows=2 width=36) (never executed)

  • Index Cond: (acc_bas_off.account_id = 630214734)
  • Filter: ((acc_bas_off.active)::text = 'Y'::text)
Planning time : 4.134 ms
Execution time : 22.119 ms