explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QzMP

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

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

  • Join Filter: (couponmanagementtable.couponid = couponcataloguemapping.couponid)
2. 0.000 0.000 ↓ 0.0

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

  • Join Filter: (couponmanagementtable.couponid = couponusedmapping.couponid)
  • Filter: (couponmanagementtable.numberoftimesvalid > COALESCE(couponusedmapping.numberoftimesused, 0))
3. 0.000 0.000 ↓ 0.0

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

  • Join Filter: (couponmanagementtable.couponid = couponstoremapping.couponid)
4. 0.000 0.000 ↓ 0.0

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

  • Join Filter: (couponmanagementtable.coupontypeid = coupontypetable.coupontypeid)
5. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (couponid = 6,489,856)
  • Filter: ((couponstatus = 'active'::text) AND (startdate <= now()) AND (enddate >= now()))
6. 0.000 0.000 ↓ 0.0

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

7. 0.000 0.000 ↓ 0.0

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

  • Index Cond: ((storeid = 146,084) AND (couponid = 6,489,856))
8. 0.000 0.000 ↓ 0.0

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

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

GroupAggregate (cost=15.93..26.23 rows=8 width=40) (actual rows= loops=)

  • Group Key: couponcataloguemapping.couponid
10. 0.000 0.000 ↓ 0.0

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

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

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

  • Index Cond: (couponid = 6,489,856)