explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c4nC

Settings
# exclusive inclusive rows x rows loops node
1. 24.473 293.167 ↑ 1.0 1 1

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

2. 19.918 268.694 ↓ 12.8 16,036 1

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

3. 66.516 151.834 ↓ 6.2 16,157 1

Bitmap Heap Scan on coupon c (cost=537.12..67,680.16 rows=2,624 width=8) (actual time=5.003..151.834 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. 4.533 4.533 ↓ 2.4 18,522 1

Bitmap Index Scan on couponplayeridfki (cost=0.00..536.46 rows=7,876 width=0) (actual time=4.533..4.533 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. 80.785 80.785 ↑ 1.0 1 16,157

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

  • Index Cond: (id = c.playerid)
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.769 ms
Execution time : 293.247 ms