add remove language chart show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
CREATE INDEX
INSERT 0 5000
ANALYZE
QUERY PLAN
Limit (actual rows=50.00 loops=1)
  Buffers: shared hit=39
  -> Index Only Scan using idx_post_created_on_id on post (actual rows=50.00 loops=1)
        Index Cond: (ROW(created_on, id) < ROW('2019-10-02 21:00:00'::timestamp without time zone, 4951))
        Heap Fetches: 50
        Index Searches: 1
        Buffers: shared hit=39
Planning:
  Buffers: shared hit=60 read=4
Planning Time: 1.925 ms
Execution Time: 0.308 ms
EXPLAIN
QUERY PLAN
Limit (actual rows=50.00 loops=1)
  Buffers: shared hit=39
  -> Index Only Scan using idx_post_created_on_id on post (actual rows=50.00 loops=1)
        Filter: ((created_on < '2019-10-02 21:00:00'::timestamp without time zone) OR ((created_on = '2019-10-02 21:00:00'::timestamp without time zone) AND (id < 4951)))
        Heap Fetches: 50
        Index Searches: 1
        Buffers: shared hit=39
Planning:
  Buffers: shared hit=3
Planning Time: 0.133 ms
Execution Time: 0.049 ms
EXPLAIN
QUERY PLAN
Limit (actual rows=50.00 loops=1)
  Buffers: shared hit=39
  -> Index Only Scan using idx_post_created_on_id on post (actual rows=50.00 loops=1)
        Index Cond: (created_on <= '2019-10-02 21:00:00'::timestamp without time zone)
        Filter: (ROW(created_on, (id)::numeric) < ROW('2019-10-02 21:00:00'::timestamp without time zone, '4951'::numeric))
        Heap Fetches: 50
        Index Searches: 1
        Buffers: shared hit=39
Planning:
  Buffers: shared hit=9
Planning Time: 0.288 ms
Execution Time: 0.107 ms
EXPLAIN
QUERY PLAN
Limit (actual rows=50.00 loops=1)
  Buffers: shared hit=39
  -> Index Only Scan using idx_post_created_on_id on post (actual rows=50.00 loops=1)
        Index Cond: (created_on < '2019-10-02 21:00:00'::timestamp without time zone)
        Heap Fetches: 50
        Index Searches: 1
        Buffers: shared hit=39
Planning:
  Buffers: shared hit=3
Planning Time: 0.144 ms
Execution Time: 0.049 ms
EXPLAIN