Re: Indexing on JSONB field not working - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: Indexing on JSONB field not working
Date
Msg-id CAMkU=1w8UyLY1e4N6m5nB9CmG1wjizqFS--Lmi3GZ4j1+JUP3Q@mail.gmail.com
Whole thread Raw
In response to Re: Indexing on JSONB field not working  (Zhihong Zhang <zhihong@gmail.com>)
Responses Re: Indexing on JSONB field not working  (Zhihong Zhang <zhihong@gmail.com>)
List pgsql-bugs
On Dec 21, 2019, at 10:17 AM, Jeff Janes <jeff.janes@gmail.com> wrote:

Can you show the output of:

select * from pg_stats where tablename ='float_number_index_path2'

For readability, use the output format which shows the columns down the screen, not across.  In psql, that would toggled on with \x.


On Thu, Dec 26, 2019 at 11:30 AM Zhihong Zhang <zhihong@gmail.com> wrote:
That command yields nothing.

Did you use the actual name of the index (in case its actual name differs from what you showed us in the CREATE INDEX)?  If you did and it doesn't show anything, then I don't think the table has been ANALYZED since the index was created.  Note that ANALYZE and EXPLAIN ANALYZE are different things.  You need to run "ANALYZE assets;" or "VACUUM ANALYZE assets;"

Cheers,

Jeff

pgsql-bugs by date:

Previous
From: Zhihong Zhang
Date:
Subject: Re: Indexing on JSONB field not working
Next
From: Zhihong Zhang
Date:
Subject: Re: Indexing on JSONB field not working