explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vlmo

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 6.448 ↑ 3.0 1 1

Nested Loop Left Join (cost=17.50..53.04 rows=3 width=159) (actual time=6.446..6.448 rows=1 loops=1)

  • Join Filter: (couponmanagementtable.couponid = couponcataloguemapping.couponid)
2. 0.004 6.439 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.57..26.71 rows=1 width=122) (actual time=6.437..6.439 rows=1 loops=1)

  • Join Filter: (couponmanagementtable.couponid = couponusedmapping.couponid)
  • Filter: (couponmanagementtable.numberoftimesvalid > COALESCE(couponusedmapping.numberoftimesused, 0))
3. 0.002 2.298 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.00..18.11 rows=1 width=110) (actual time=2.297..2.298 rows=1 loops=1)

  • Join Filter: (couponmanagementtable.couponid = couponstoremapping.couponid)
4. 0.003 0.039 ↑ 1.0 1 1

Nested Loop (cost=0.43..9.51 rows=1 width=102) (actual time=0.037..0.039 rows=1 loops=1)

  • Join Filter: (couponmanagementtable.coupontypeid = coupontypetable.coupontypeid)
5. 0.033 0.033 ↑ 1.0 1 1

Index Scan using couponmanagementtable_pkey on couponmanagementtable (cost=0.43..8.46 rows=1 width=70) (actual time=0.032..0.033 rows=1 loops=1)

  • Index Cond: (couponid = 6,489,856)
  • Filter: ((couponstatus = 'active'::text) AND (startdate <= now()) AND (enddate >= now()))
6. 0.003 0.003 ↑ 2.0 1 1

Seq Scan on coupontypetable (cost=0.00..1.02 rows=2 width=40) (actual time=0.003..0.003 rows=1 loops=1)

7. 2.257 2.257 ↑ 1.0 1 1

Index Only Scan using couponstoremapping_storeid_couponid_key on couponstoremapping (cost=0.57..8.59 rows=1 width=16) (actual time=2.257..2.257 rows=1 loops=1)

  • Index Cond: ((storeid = 146,084) AND (couponid = 6,489,856))
  • Heap Fetches: 1
8. 4.137 4.137 ↑ 1.0 1 1

Index Scan using couponusedmapping_couponid_storeid_key on couponusedmapping (cost=0.57..8.59 rows=1 width=20) (actual time=4.137..4.137 rows=1 loops=1)

  • Index Cond: ((couponid = 6,489,856) AND (storeid = 146,084))
9. 0.001 0.004 ↓ 0.0 0 1

GroupAggregate (cost=15.93..26.23 rows=8 width=40) (actual time=0.003..0.004 rows=0 loops=1)

  • Group Key: couponcataloguemapping.couponid
10. 0.001 0.003 ↓ 0.0 0 1

Bitmap Heap Scan on couponcataloguemapping (cost=15.93..26.09 rows=8 width=16) (actual time=0.003..0.003 rows=0 loops=1)

  • Recheck Cond: (couponid = 6,489,856)
11. 0.002 0.002 ↓ 0.0 0 1

Bitmap Index Scan on couponcataloguemapping_catalogueid_productid_couponid_key (cost=0.00..15.93 rows=8 width=0) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (couponid = 6,489,856)
Planning time : 0.395 ms
Execution time : 6.504 ms