By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 2
CREATE INDEX
| id | environment_id | profile |
|---|---|---|
| 1 | test | {"fruit": "cherry", "timezone": "NZ/Auckland"} |
SELECT 1
SET
| QUERY PLAN |
|---|
| Bitmap Heap Scan on end_user u (cost=20.00..24.01 rows=1 width=96) |
| Recheck Cond: (profile @? '$."timezone"?(@ like_regex "auckland" flag "i")'::jsonpath) |
| -> Bitmap Index Scan on end_user_path_ops_idx (cost=0.00..20.00 rows=1 width=0) |
| Index Cond: (profile @? '$."timezone"?(@ like_regex "auckland" flag "i")'::jsonpath) |
EXPLAIN