For the whole column, items_purchased use

CREATE INDEX idx_purchases ON public.purchases
(items_purchased)

For a specific Key (price here) in the field use,

CREATE INDEX idx_purchases_price
ON public.purchases
((items_purchased ->> ‘price’))

Hope this helps

gravity well (Rob Tomlin)
gravity well (Rob Tomlin)

Written by gravity well (Rob Tomlin)

Software Engineering Manager. Explorer, learner, teacher, and more

No responses yet