explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4paO

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

Nested Loop (cost=128.01..20,182.56 rows=1 width=191) (actual time=92.714..92.714 rows=0 loops=1)

  • Buffers: shared hit=112809
2. 0.000 92.714 ↓ 0.0 0 1

Nested Loop (cost=127.57..20,180.15 rows=1 width=179) (actual time=92.714..92.714 rows=0 loops=1)

  • Buffers: shared hit=112809
3. 0.000 92.714 ↓ 0.0 0 1

Nested Loop (cost=127.28..20,177.97 rows=1 width=187) (actual time=92.714..92.714 rows=0 loops=1)

  • Buffers: shared hit=112809
4. 0.000 92.714 ↓ 0.0 0 1

Nested Loop (cost=126.86..20,175.52 rows=1 width=195) (actual time=92.714..92.714 rows=0 loops=1)

  • Buffers: shared hit=112809
5. 13.397 83.947 ↓ 9,879.0 9,879 1

Nested Loop (cost=1.44..20,048.64 rows=1 width=187) (actual time=0.216..83.947 rows=9,879 loops=1)

  • Buffers: shared hit=112793
6. 3.005 40.913 ↓ 9,879.0 9,879 1

Nested Loop (cost=0.87..20,045.82 rows=1 width=159) (actual time=0.192..40.913 rows=9,879 loops=1)

  • Buffers: shared hit=43640
7. 9.639 31.554 ↓ 1,059.0 1,059 1

Nested Loop (cost=0.43..20,024.33 rows=1 width=154) (actual time=0.171..31.554 rows=1,059 loops=1)

  • Buffers: shared hit=39027
8. 2.521 2.521 ↑ 1.0 9,697 1

Seq Scan on en_basket_offer bas_off (cost=0..262.32 rows=9,697 width=57) (actual time=0.006..2.521 rows=9,697 loops=1)

  • Filter: (bas_off.is_bonus = 'N'::bpchar)
  • Buffers: shared hit=141
9. 19.394 19.394 ↓ 0.0 0 9,697

Index Scan using en_offer_pk on en_offer off (cost=0.43..2.04 rows=1 width=97) (actual time=0.002..0.002 rows=0 loops=9,697)

  • Index Cond: (off.offer_id = bas_off.offer_id)
  • Filter: ((off.offer_type_id = 3) AND (off.offer_status_id = 2) AND (CURRENT_TIMESTAMP >= off.offer_start_dt) AND (CURRENT_TIMESTAMP <= off.offer_end_dt))
  • Buffers: shared hit=38886
10. 6.354 6.354 ↑ 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.006 rows=9 loops=1,059)

  • Index Cond: (off_site.offer_id = bas_off.offer_id)
  • Buffers: shared hit=4613
11. 29.637 29.637 ↓ 1.5 3 9,879

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) (actual time=0.002..0.003 rows=3 loops=9,879)

  • Index Cond: (acc_bas_off.account_id = 630244518)
  • Filter: ((acc_bas_off.active)::text = 'Y'::text)
  • Buffers: shared hit=69153
12. 9.840 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
13. 0.000 0.039 ↑ 22.5 2 1

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

  • Buffers: shared hit=16
14. 0.015 0.015 ↑ 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.013..0.015 rows=2 loops=1)

  • Index Cond: (ps1.site_id = 457364)
  • Buffers: shared hit=5
15. 0.003 0.024 ↓ 0.0 0 1

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

  • Buffers: shared hit=11
16. 0.013 0.013 ↑ 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.012..0.013 rows=2 loops=1)

  • Index Cond: (sgs.site_id = 457364)
  • Buffers: shared hit=5
17. 0.008 0.008 ↓ 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.004..0.004 rows=0 loops=2)

  • Index Cond: (ps.site_group_id = sgs.site_group_id)
  • Buffers: shared hit=6
18. 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[]))
19. 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))
20. 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)
Planning time : 3.658 ms
Execution time : 92.868 ms