add batch remove batch split batch show hidden batches hide batch
db<>fiddle
feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
100000 rows affected
QUERY PLAN
Limit (cost=96.29..96.31 rows=10 width=20) (actual time=0.133..0.135 rows=10 loops=1)
  Buffers: shared hit=47 read=8
  -> Sort (cost=96.29..96.42 rows=51 width=20) (actual time=0.132..0.133 rows=10 loops=1)
        Sort Key: refreshed_utc
        Sort Method: top-N heapsort Memory: 25kB
        Buffers: shared hit=47 read=8
        -> Index Scan using tbl_foo_idx on tbl (cost=0.42..95.19 rows=51 width=20) (actual time=0.036..0.115 rows=52 loops=1)
              Index Cond: ((purged_utc IS NULL) AND (refreshed_utc < '2021-07-11 00:00:00'::timestamp without time zone))
              Buffers: shared hit=47 read=8
Planning:
  Buffers: shared hit=34 read=1
Planning Time: 0.270 ms
Execution Time: 0.171 ms
QUERY PLAN
Limit (cost=0.42..6.19 rows=1 width=20) (actual time=0.022..0.022 rows=0 loops=1)
  Buffers: shared hit=1 read=2
  -> Index Scan using tbl_foo_idx on tbl (cost=0.42..6.19 rows=1 width=20) (actual time=0.021..0.022 rows=0 loops=1)
        Index Cond: ((purged_utc = '2021-07-11 00:00:00'::timestamp without time zone) AND (refreshed_utc < '2021-07-11 00:00:00'::timestamp without time zone))
        Buffers: shared hit=1 read=2
Planning Time: 0.059 ms
Execution Time: 0.035 ms