By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| setseed |
|---|
SELECT 1
CREATE TABLE
INSERT 0 110183
INSERT 0 1
INSERT 0 81493
INSERT 0 1
INSERT 0 57659
INSERT 0 1
INSERT 0 0
| count |
|---|
| 249338 |
SELECT 1
CREATE INDEX
VACUUM
| QUERY PLAN |
|---|
| Index Only Scan using test_r_idx on public.test (cost=0.28..4.30 rows=1 width=22) (actual time=0.048..0.049 rows=3 loops=1) |
| Output: r |
| Index Cond: (test.r @> '12345678912'::bigint) |
| Heap Fetches: 0 |
| Planning Time: 1.274 ms |
| Execution Time: 0.083 ms |
EXPLAIN
| r |
|---|
| [12345678901,12345678914) |
| [12345678910,12345678913) |
| [12345678902,12345678921) |
SELECT 3