explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SRcp

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.041 ↑ 1.0 1 1

Limit (cost=1.58..31.19 rows=1 width=51) (actual time=0.040..0.041 rows=1 loops=1)

2. 0.003 0.039 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.58..31.19 rows=1 width=51) (actual time=0.039..0.039 rows=1 loops=1)

  • Join Filter: ((aurc.referred_code)::text = (cc.code)::text)
3. 0.000 0.026 ↑ 1.0 1 1

Nested Loop (cost=1.15..22.73 rows=1 width=43) (actual time=0.026..0.026 rows=1 loops=1)

4. 0.003 0.022 ↑ 1.0 1 1

Nested Loop (cost=0.86..14.42 rows=1 width=18) (actual time=0.022..0.022 rows=1 loops=1)

5. 0.014 0.014 ↑ 1.0 1 1

Index Scan using coupon_codes_code_unique on coupon_codes cc (cost=0.43..8.45 rows=1 width=18) (actual time=0.014..0.014 rows=1 loops=1)

  • Index Cond: ((code)::text = '3ln19145'::text)
6. 0.005 0.005 ↑ 56.0 1 1

Index Only Scan using application_user_coupons_updated_at on application_user_coupons auc (cost=0.42..5.41 rows=56 width=4) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (coupon_code_id = cc.id)
  • Heap Fetches: 0
7. 0.004 0.004 ↑ 1.0 1 1

Index Scan using coupons_pkey on coupons c (cost=0.29..8.31 rows=1 width=29) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id = cc.coupon_id)
  • Filter: (referred_coupon_type_id IS NOT NULL)
8. 0.010 0.010 ↑ 1.0 1 1

Index Scan using application_user_referred_codes_referred_code_index on application_user_referred_codes aurc (cost=0.43..8.45 rows=1 width=23) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: ((referred_code)::text = '3ln19145'::text)
Planning time : 0.414 ms
Execution time : 0.136 ms