explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jgB

Settings
# exclusive inclusive rows x rows loops node
1. 0.023 0.156 ↑ 1.0 1 1

Aggregate (cost=22.13..22.14 rows=1 width=68) (actual time=0.156..0.156 rows=1 loops=1)

2.          

CTE seats

3. 0.016 0.080 ↑ 1.0 6 1

Bitmap Heap Scan on seats (cost=1.42..7.86 rows=6 width=32) (actual time=0.072..0.080 rows=6 loops=1)

  • Recheck Cond: (seat_owner_id = 'dd237735-7816-46e0-9f3a-5bb1f1dced37'::uuid)
  • Heap Blocks: exact=2
4. 0.064 0.064 ↑ 1.0 6 1

Bitmap Index Scan on seats_seat_owner_id_index (cost=0.00..1.42 rows=6 width=0) (actual time=0.064..0.064 rows=6 loops=1)

  • Index Cond: (seat_owner_id = 'dd237735-7816-46e0-9f3a-5bb1f1dced37'::uuid)
5.          

CTE balances

6. 0.004 0.129 ↑ 1.0 6 1

Nested Loop (cost=0.41..14.10 rows=6 width=12) (actual time=0.102..0.129 rows=6 loops=1)

7. 0.007 0.089 ↑ 1.0 6 1

HashAggregate (cost=0.14..0.20 rows=6 width=16) (actual time=0.087..0.089 rows=6 loops=1)

  • Group Key: seats_1.seat_id
8. 0.082 0.082 ↑ 1.0 6 1

CTE Scan on seats seats_1 (cost=0.00..0.12 rows=6 width=16) (actual time=0.074..0.082 rows=6 loops=1)

9. 0.036 0.036 ↑ 1.0 1 6

Index Scan using seat_balance_seat_id_index on seat_balance (cost=0.27..2.31 rows=1 width=28) (actual time=0.006..0.006 rows=1 loops=6)

  • Index Cond: (seat_id = seats_1.seat_id)
10. 0.133 0.133 ↑ 1.0 6 1

CTE Scan on balances (cost=0.00..0.12 rows=6 width=56) (actual time=0.105..0.133 rows=6 loops=1)

Planning time : 0.308 ms
Execution time : 0.267 ms