explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DS9n

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 101.021 ↑ 1.0 1 1

Finalize Aggregate (cost=28,241.92..28,241.93 rows=1 width=32) (actual time=101.020..101.021 rows=1 loops=1)

2. 20.130 109.110 ↓ 1.5 3 1

Gather (cost=28,241.70..28,241.91 rows=2 width=32) (actual time=97.032..109.110 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.741 88.980 ↑ 1.0 1 3 / 3

Partial Aggregate (cost=27,241.70..27,241.71 rows=1 width=32) (actual time=88.979..88.980 rows=1 loops=3)

4. 2.025 86.239 ↓ 3.4 5,345 3 / 3

Nested Loop (cost=538.85..27,237.78 rows=1,568 width=5) (actual time=1.794..86.239 rows=5,345 loops=3)

5. 23.459 24.972 ↓ 1.6 5,386 3 / 3

Parallel Bitmap Heap Scan on coupon c (cost=538.43..17,970.79 rows=3,280 width=8) (actual time=1.747..24.972 rows=5,386 loops=3)

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

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

  • Index Cond: ((playerid = '65e98a4a-a2f3-4d6d-9b80-7b923b743ed6'::uuid) AND ((state)::text = ANY ('{played,paid,won,lost}'::text[])))
7. 59.242 59.242 ↑ 1.0 1 16,157 / 3

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

  • Index Cond: (couponnewid = c.newid)
Planning time : 0.676 ms
Execution time : 109.223 ms