Re: Indexing on JSONB field not working

Jeff Janes <[email protected]> Sat, 28 Dec 2019 14:10:40 -0500
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <CAMkU=1y+D8SyZ+MOQAsJN_4HRm5QaLWFgKe2MyXbkbz0d5fmrA@mail.gmail.com>
On Fri, Dec 27, 2019 at 3:26 PM Zhihong Zhang <[email protected]> wrote:

> Finally got stats on the new table assets_copy. Still don’t know what’s
> the magic. I have 2 indexes in this new table, only this one got stats.
>

Only one of your indexes is over an expression.  The index over a plain
column will never have stats, as column stats are stored with the table,
not the index.

Cheers,

Jeff