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: 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-27 17:45:03
Message-ID: CAMkU=1z4do7EF5K4Kz2rjy8R_ELnGEket-TWwa=YwjMwMb_RuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Dec 26, 2019 at 11:58 AM Zhihong Zhang <zhihong(at)gmail(dot)com> wrote:

> The index name is correct and I ran ‘analyze' multiple times since the
> index is created. I have dozen indexes, some are created when table is
> created. None of them is in pg_stats.
>
> The pg_stats only contains a row for each column, nothing else.
>
> The database is on AWS RDS. Does that make any difference?
>

I used an RDS 11.5 (not Aurora) instance, and had no trouble getting or
seeing the statistics on the expressional index when logged in as the table
owner. They were populated by `ANALYZE assets;`, or by `ANALYZE;`, or by
just letting auto-analyze run (if there was enough turn over after the
index was created to trigger auto-analyze).

Can you do `pg_dump -s -t assets ...` to get a full description of the
table? If you don't want to share the full description, make sure whatever
simplifications you do to it don't prevent the problem from reproducing.

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-12-27 17:45:32 Re: Indexing on JSONB field not working
Previous Message Zhihong Zhang 2019-12-27 17:28:38 RE: Indexing on JSONB field not working