explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cyxI

Settings
# exclusive inclusive rows x rows loops node
1. 18.220 21.070 ↑ 1.0 1 1

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

  • Output: payloads.id, payloads.value, payloads.state, payloads.attempts, payloads.created_at, payloads.modified_at
  • Buffers: shared hit=69
2. 0.003 2.850 ↑ 1.0 1 1

Nested Loop (cost=4.01..12.04 rows=1 width=102) (actual time=2.849..2.850 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=43
3. 0.013 2.836 ↑ 1.0 1 1

HashAggregate (cost=3.73..3.74 rows=1 width=40) (actual time=2.835..2.836 rows=1 loops=1)

  • Output: "ANY_subquery".*, "ANY_subquery".id
  • Group Key: "ANY_subquery".id
  • Buffers: shared hit=40
4. 0.023 2.823 ↑ 1.0 1 1

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

  • Output: "ANY_subquery".*, "ANY_subquery".id
  • Buffers: shared hit=40
5. 0.002 2.800 ↑ 1.0 1 1

Limit (cost=0.28..3.71 rows=1 width=22) (actual time=2.799..2.800 rows=1 loops=1)

  • Output: payloads_1.id, payloads_1.modified_at, payloads_1.ctid
  • Buffers: shared hit=40
6. 1.502 2.798 ↑ 47.0 1 1

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

  • Output: payloads_1.id, payloads_1.modified_at, payloads_1.ctid
  • Buffers: shared hit=40
7. 1.296 1.296 ↑ 2.2 21 1

Index Scan using active_modified_at_idx on public.payloads payloads_1 (cost=0.28..161.11 rows=47 width=22) (actual time=1.262..1.296 rows=21 loops=1)

  • Output: payloads_1.id, payloads_1.modified_at, payloads_1.ctid
  • Filter: (payloads_1.state = 'enqueued'::state_t)
  • Buffers: shared hit=19
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.299 ms 1 0.299 ms