explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ur2W

Settings
# exclusive inclusive rows x rows loops node
1. 0.635 27.173 ↓ 0.0 0 1

Delete on public.kv (cost=36.71..10,590.07 rows=0 width=0) (actual time=27.170..27.173 rows=0 loops=1)

  • Query Identifier: -8226339520301693636
  • Buffers: shared hit=11,059
2.          

InitPlan 1 (for Delete) (returns $0)

3. 0.060 0.758 ↑ 1.0 1 1

Limit (cost=36.67..36.71 rows=1 width=8) (actual time=0.757..0.758 rows=1 loops=1)

  • Output: kv_1.expires
  • Buffers: shared hit=1,006
4. 0.698 0.698 ↑ 100.0 1,000 1

Index Only Scan using kv_expires_idx on public.kv kv_1 (cost=0.29..3,640.82 rows=99,974 width=8) (actual time=0.025..0.698 rows=1,000 loops=1)

  • Output: kv_1.expires
  • Index Cond: (kv_1.expires <= now())
  • Heap Fetches: 1,000
  • Buffers: shared hit=1,006
5. 25.780 26.538 ↑ 33.3 1,000
- 99,024
1

Seq Scan on public.kv (cost=0.00..10,553.36 rows=33,335 width=6) (actual time=11.072..26.538 rows=1,000 loops=1)

  • Output: kv.ctid
  • Filter: ((kv.expires IS NOT NULL) AND (kv.expires <= COALESCE($0, now())))
  • Rows Removed by Filter: 99,024
  • Buffers: shared hit=10,059
Planning time : 0.159 ms
Execution time : 27.216 ms