By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE FUNCTION
CREATE TABLE
CREATE INDEX
INSERT 0 20000
ANALYZE
| QUERY PLAN |
|---|
| Bitmap Heap Scan on public.test (cost=5.14..234.71 rows=83 width=17) (actual time=0.048..0.142 rows=90 loops=1) |
| Output: ch_short |
| Recheck Cond: (((test.ch_short)::text >= 'A1'::text) AND ((test.ch_short)::text < 'A2'::text)) |
| Heap Blocks: exact=80 |
| -> Bitmap Index Scan on idx (cost=0.00..5.12 rows=83 width=0) (actual time=0.026..0.026 rows=90 loops=1) |
| Index Cond: (((test.ch_short)::text >= 'A1'::text) AND ((test.ch_short)::text < 'A2'::text)) |
| Planning Time: 0.202 ms |
| Execution Time: 0.182 ms |
EXPLAIN