explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 45v

Settings
# exclusive inclusive rows x rows loops node
1. 0.158 2.132 ↑ 1.0 1 1

Aggregate (cost=754.66..754.67 rows=1 width=68) (actual time=2.132..2.132 rows=1 loops=1)

2.          

CTE seats

3. 0.547 0.648 ↑ 1.0 301 1

Bitmap Heap Scan on seats seats_1 (cost=4.91..324.61 rows=313 width=32) (actual time=0.139..0.648 rows=301 loops=1)

  • Recheck Cond: (seat_owner_id = 'a12abdb3-a97a-4e3d-b12b-dee6bf467819'::uuid)
  • Heap Blocks: exact=268
4. 0.101 0.101 ↑ 1.0 301 1

Bitmap Index Scan on seats_seat_owner_id_index (cost=0.00..4.83 rows=313 width=0) (actual time=0.101..0.101 rows=301 loops=1)

  • Index Cond: (seat_owner_id = 'a12abdb3-a97a-4e3d-b12b-dee6bf467819'::uuid)
5. 0.171 1.974 ↑ 38.7 301 1

Nested Loop (cost=7.33..342.64 rows=11,654 width=10) (actual time=0.871..1.974 rows=301 loops=1)

6. 0.119 0.900 ↓ 1.5 301 1

HashAggregate (cost=7.04..9.04 rows=200 width=16) (actual time=0.856..0.900 rows=301 loops=1)

  • Group Key: seats.seat_id
7. 0.781 0.781 ↑ 1.0 301 1

CTE Scan on seats (cost=0.00..6.26 rows=313 width=16) (actual time=0.141..0.781 rows=301 loops=1)

8. 0.903 0.903 ↑ 1.0 1 301

Index Scan using seat_balance_seat_id_index on seat_balance (cost=0.29..1.66 rows=1 width=26) (actual time=0.003..0.003 rows=1 loops=301)

  • Index Cond: (seat_id = seats.seat_id)
Planning time : 0.244 ms
Execution time : 2.209 ms