explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l4QL

Settings
# exclusive inclusive rows x rows loops node
1. 1.642 23.461 ↑ 1.0 1 1

Update on public.payloads (cost=4.01..12.04 rows=1 width=102) (actual time=23.459..23.461 rows=1 loops=1)

  • Output: payloads.id, payloads.value, payloads.state, payloads.attempts, payloads.created_at, payloads.modified_at
  • Buffers: shared hit=181
2. 0.004 21.819 ↑ 1.0 1 1

Nested Loop (cost=4.01..12.04 rows=1 width=102) (actual time=21.818..21.819 rows=1 loops=1)

  • Output: payloads.id, payloads.value, payloads.attempts, 'dequeued'::state_t, payloads.created_at, payloads.modified_at, payloads.ctid, "ANY_subquery".*
  • Inner Unique: true
  • Buffers: shared hit=155
3. 0.011 21.804 ↑ 1.0 1 1

HashAggregate (cost=3.73..3.74 rows=1 width=40) (actual time=21.803..21.804 rows=1 loops=1)

  • Output: "ANY_subquery".*, "ANY_subquery".id
  • Group Key: "ANY_subquery".id
  • Buffers: shared hit=152
4. 0.020 21.793 ↑ 1.0 1 1

Subquery Scan on ANY_subquery (cost=0.28..3.72 rows=1 width=40) (actual time=21.791..21.793 rows=1 loops=1)

  • Output: "ANY_subquery".*, "ANY_subquery".id
  • Buffers: shared hit=152
5. 0.001 21.773 ↑ 1.0 1 1

Limit (cost=0.28..3.71 rows=1 width=22) (actual time=21.772..21.773 rows=1 loops=1)

  • Output: payloads_1.id, payloads_1.modified_at, payloads_1.ctid
  • Buffers: shared hit=152
6. 21.628 21.772 ↑ 47.0 1 1

LockRows (cost=0.28..161.58 rows=47 width=22) (actual time=21.771..21.772 rows=1 loops=1)

  • Output: payloads_1.id, payloads_1.modified_at, payloads_1.ctid
  • Buffers: shared hit=152
7. 0.144 0.144 ↓ 1.5 70 1

Index Scan using active_modified_at_idx on public.payloads payloads_1 (cost=0.28..161.11 rows=47 width=22) (actual time=0.010..0.144 rows=70 loops=1)

  • Output: payloads_1.id, payloads_1.modified_at, payloads_1.ctid
  • Filter: (payloads_1.state = 'enqueued'::state_t)
  • Buffers: shared hit=66
8. 0.011 0.011 ↑ 1.0 1 1

Index Scan using payloads_pkey on public.payloads (cost=0.29..8.30 rows=1 width=66) (actual time=0.011..0.011 rows=1 loops=1)

  • Output: payloads.id, payloads.value, payloads.attempts, payloads.created_at, payloads.modified_at, payloads.ctid
  • Index Cond: (payloads.id = "ANY_subquery".id)
  • Buffers: shared hit=3
Trigger times:
Trigger Name:Total time:Calls:Average time:
payloads_modified 0.268 ms 1 0.268 ms