explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FK8p

Settings
# exclusive inclusive rows x rows loops node
1. 7.826 241.714 ↑ 1.0 1 1

Aggregate (cost=79,223.10..79,223.11 rows=1 width=32) (actual time=241.714..241.714 rows=1 loops=1)

2. 34.741 233.888 ↓ 12.8 16,036 1

Nested Loop (cost=537.54..79,219.96 rows=1,255 width=5) (actual time=4.005..233.888 rows=16,036 loops=1)

3. 34.009 102.205 ↓ 6.2 16,157 1

Bitmap Heap Scan on coupon c (cost=537.12..67,680.16 rows=2,624 width=8) (actual time=3.992..102.205 rows=16,157 loops=1)

  • Recheck Cond: ((playerid = '65e98a4a-a2f3-4d6d-9b80-7b923b743ed6'::uuid) AND ((state)::text = ANY ('{played,paid,won,lost}'::text[])))
  • Filter: (((status)::text = 'active'::text) AND (recorddate >= (SubPlan 1)))
  • Heap Blocks: exact=2649
4. 3.568 3.568 ↓ 2.4 18,522 1

Bitmap Index Scan on couponplayeridfki (cost=0.00..536.46 rows=7,876 width=0) (actual time=3.568..3.568 rows=18,522 loops=1)

  • Index Cond: ((playerid = '65e98a4a-a2f3-4d6d-9b80-7b923b743ed6'::uuid) AND ((state)::text = ANY ('{played,paid,won,lost}'::text[])))
5.          

SubPlan (for Bitmap Heap Scan)

6. 64.628 64.628 ↑ 1.0 1 16,157

Index Only Scan using playerpk on player (cost=0.28..6.30 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=16,157)

  • Index Cond: (id = c.playerid)
  • Heap Fetches: 16157
7. 96.942 96.942 ↑ 1.0 1 16,157

Index Scan using coupontransaction_couponnewid_uidx on coupontransaction ct (cost=0.42..4.39 rows=1 width=13) (actual time=0.006..0.006 rows=1 loops=16,157)

  • Index Cond: (couponnewid = c.newid)
Planning time : 0.658 ms
Execution time : 241.782 ms