Other than creating a functional index on the keys that you most want to
access and include that function call in your query, I don't know that you
can. Functional indexes get statistics while partial indexes do not. If a
GIN index using path operator collected stats on the frequency of the keys,
then you would be all set I think. Perhaps that is a feature that could be
implemented.

Others will chime in I expect, but I tend to avoid using jsonb for any
values that I need to use to significant filter a result set (ON and WHERE
clauses).

Reply via email to