explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RcLG

Settings
# exclusive inclusive rows x rows loops node
1. 0.056 0.129 ↑ 1,450.0 1 1

Update on payloads (cost=8.53..37.52 rows=1,450 width=66) (actual time=0.111..0.129 rows=1 loops=1)

  • Update on payloads_0_10000000
  • Update on payloads_10000000_20000000
  • Buffers: shared hit=27
2. 0.003 0.056 ↑ 725.0 1 1

Nested Loop (cost=8.53..18.76 rows=725 width=66) (actual time=0.055..0.056 rows=1 loops=1)

  • Buffers: shared hit=6
3. 0.003 0.046 ↑ 1.0 1 1

HashAggregate (cost=4.33..4.34 rows=1 width=40) (actual time=0.045..0.046 rows=1 loops=1)

  • Group Key: "ANY_subquery".id
  • Buffers: shared hit=4
4. 0.018 0.043 ↑ 1.0 1 1

Subquery Scan on ANY_subquery (cost=0.28..4.33 rows=1 width=40) (actual time=0.042..0.043 rows=1 loops=1)

  • Buffers: shared hit=4
5. 0.001 0.025 ↑ 1.0 1 1

Limit (cost=0.28..4.32 rows=1 width=26) (actual time=0.024..0.025 rows=1 loops=1)

  • Buffers: shared hit=4
6. 0.009 0.024 ↑ 14.0 1 1

LockRows (cost=0.28..56.77 rows=14 width=26) (actual time=0.024..0.024 rows=1 loops=1)

  • Buffers: shared hit=4
7. 0.000 0.015 ↑ 14.0 1 1

Merge Append (cost=0.28..56.63 rows=14 width=26) (actual time=0.015..0.015 rows=1 loops=1)

  • Sort Key: p1.modified_at
  • Buffers: shared hit=3
8. 0.010 0.010 ↑ 7.0 1 1

Index Scan using payloads_0_10000000_modified_at_idx on payloads_0_10000000 p1 (cost=0.14..28.27 rows=7 width=26) (actual time=0.010..0.010 rows=1 loops=1)

  • Filter: (state = 'enqueued'::state_t)
  • Buffers: shared hit=2
9. 0.005 0.005 ↓ 0.0 0 1

Index Scan using payloads_10000000_20000000_modified_at_idx on payloads_10000000_20000000 p1_1 (cost=0.12..28.22 rows=7 width=26) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: (state = 'enqueued'::state_t)
  • Buffers: shared hit=1
10. 0.005 0.007 ↑ 7.0 1 1

Bitmap Heap Scan on payloads_0_10000000 (cost=4.21..14.35 rows=7 width=30) (actual time=0.007..0.007 rows=1 loops=1)

  • Recheck Cond: (id = "ANY_subquery".id)
  • Heap Blocks: exact=1
  • Buffers: shared hit=2
11. 0.002 0.002 ↑ 7.0 1 1

Bitmap Index Scan on payloads_0_10000000_pkey (cost=0.00..4.21 rows=7 width=0) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (id = "ANY_subquery".id)
  • Buffers: shared hit=1
12. 0.002 0.017 ↓ 0.0 0 1

Nested Loop (cost=8.53..18.76 rows=725 width=66) (actual time=0.017..0.017 rows=0 loops=1)

  • Buffers: shared hit=6
13. 0.001 0.013 ↑ 1.0 1 1

HashAggregate (cost=4.33..4.34 rows=1 width=40) (actual time=0.013..0.013 rows=1 loops=1)

  • Group Key: "ANY_subquery_1".id
  • Buffers: shared hit=5
14. 0.002 0.012 ↑ 1.0 1 1

Subquery Scan on ANY_subquery_1 (cost=0.28..4.33 rows=1 width=40) (actual time=0.011..0.012 rows=1 loops=1)

  • Buffers: shared hit=5
15. 0.001 0.010 ↑ 1.0 1 1

Limit (cost=0.28..4.32 rows=1 width=26) (actual time=0.010..0.010 rows=1 loops=1)

  • Buffers: shared hit=5
16. 0.001 0.009 ↑ 14.0 1 1

LockRows (cost=0.28..56.77 rows=14 width=26) (actual time=0.009..0.009 rows=1 loops=1)

  • Buffers: shared hit=5
17. 0.001 0.008 ↑ 7.0 2 1

Merge Append (cost=0.28..56.63 rows=14 width=26) (actual time=0.007..0.008 rows=2 loops=1)

  • Sort Key: p1_2.modified_at
  • Buffers: shared hit=3
18. 0.003 0.003 ↑ 3.5 2 1

Index Scan using payloads_0_10000000_modified_at_idx on payloads_0_10000000 p1_2 (cost=0.14..28.27 rows=7 width=26) (actual time=0.002..0.003 rows=2 loops=1)

  • Filter: (state = 'enqueued'::state_t)
  • Buffers: shared hit=2
19. 0.004 0.004 ↓ 0.0 0 1

Index Scan using payloads_10000000_20000000_modified_at_idx on payloads_10000000_20000000 p1_3 (cost=0.12..28.22 rows=7 width=26) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: (state = 'enqueued'::state_t)
  • Buffers: shared hit=1
20. 0.001 0.002 ↓ 0.0 0 1

Bitmap Heap Scan on payloads_10000000_20000000 (cost=4.21..14.35 rows=7 width=30) (actual time=0.002..0.002 rows=0 loops=1)

  • Recheck Cond: (id = "ANY_subquery_1".id)
  • Buffers: shared hit=1
21. 0.001 0.001 ↓ 0.0 0 1

Bitmap Index Scan on payloads_10000000_20000000_pkey (cost=0.00..4.21 rows=7 width=0) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (id = "ANY_subquery_1".id)
  • Buffers: shared hit=1