explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tFfB

Settings
# exclusive inclusive rows x rows loops node
1. 0.788 2.023 ↓ 0.0 0 1

Delete on public.kv (cost=932.69..10,485.71 rows=0 width=0) (actual time=2.022..2.023 rows=0 loops=1)

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

InitPlan 1 (for Delete) (returns $0)

3. 0.061 0.741 ↑ 1.0 1 1

Limit (cost=36.67..36.71 rows=1 width=8) (actual time=0.740..0.741 rows=1 loops=1)

  • Output: kv_1.expires
  • Buffers: shared hit=1,006
4. 0.680 0.680 ↑ 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.029..0.680 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. 0.154 1.235 ↑ 33.3 1,000 1

Bitmap Heap Scan on public.kv (cost=895.98..10,449.00 rows=33,335 width=6) (actual time=0.898..1.235 rows=1,000 loops=1)

  • Output: kv.ctid
  • Recheck Cond: ((kv.expires IS NOT NULL) AND (kv.expires <= COALESCE($0, now())))
  • Heap Blocks: exact=337
  • Buffers: shared hit=1,348
6. 0.340 0.850 ↑ 33.3 1,000 1

Bitmap Index Scan on kv_expires_idx (cost=0.00..887.65 rows=33,335 width=0) (actual time=0.850..0.850 rows=1,000 loops=1)

  • Index Cond: ((kv.expires IS NOT NULL) AND (kv.expires <= COALESCE($0, now())))
  • Buffers: shared hit=1,011
Planning time : 0.165 ms
Execution time : 2.063 ms