Re: Indexing on JSONB field not working

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Zhihong Zhang <zhihong(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Indexing on JSONB field not working
Date: 2019-12-28 19:10:40
Message-ID: CAMkU=1y+D8SyZ+MOQAsJN_4HRm5QaLWFgKe2MyXbkbz0d5fmrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Dec 27, 2019 at 3:26 PM Zhihong Zhang <zhihong(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Janes 2019-12-28 19:15:29 Re: Indexing on JSONB field not working
Previous Message Tom Lane 2019-12-27 22:36:56 Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes