add remove split 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
INSERT 0 10000
VACUUM
QUERY PLAN
Index Only Scan using demo_pkey on demo (cost=0.29..79.56 rows=25 width=8) (actual time=0.334..0.363 rows=25 loops=1)
  Index Cond: (num = ANY ('{2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}'::bigint[]))
  Heap Fetches: 0
  Buffers: shared hit=54
Planning:
  Buffers: shared hit=26
Planning Time: 0.431 ms
Execution Time: 0.944 ms
EXPLAIN
QUERY PLAN
Bitmap Heap Scan on demo (cost=107.47..149.28 rows=25 width=8) (actual time=0.388..0.394 rows=25 loops=1)
  Recheck Cond: ((num = 2) OR (num = 3) OR (num = 5) OR (num = 7) OR (num = 11) OR (num = 13) OR (num = 17) OR (num = 19) OR (num = 23) OR (num = 29) OR (num = 31) OR (num = 37) OR (num = 41) OR (num = 43) OR (num = 47) OR (num = 53) OR (num = 59) OR (num = 61) OR (num = 67) OR (num = 71) OR (num = 73) OR (num = 79) OR (num = 83) OR (num = 89) OR (num = 97))
  Heap Blocks: exact=1
  Buffers: shared hit=54
  -> BitmapOr (cost=107.47..107.47 rows=25 width=0) (actual time=0.374..0.378 rows=0 loops=1)
        Buffers: shared hit=53
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.262..0.263 rows=1 loops=1)
              Index Cond: (num = 2)
              Buffers: shared hit=5
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=1)
              Index Cond: (num = 3)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.075..0.076 rows=1 loops=1)
              Index Cond: (num = 5)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=1)
              Index Cond: (num = 7)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 11)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 13)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 17)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 19)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 23)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 29)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 31)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 37)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 41)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 43)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 47)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 53)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 59)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 61)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 67)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 71)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 73)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 79)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 83)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 89)
              Buffers: shared hit=2
        -> Bitmap Index Scan on demo_pkey (cost=0.00..4.29 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
              Index Cond: (num = 97)
              Buffers: shared hit=2
Planning:
  Buffers: shared hit=3
Planning Time: 2.740 ms
Execution Time: 1.116 ms
EXPLAIN