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

From Zhihong Zhang
Subject Re: Indexing on JSONB field not working
Date
Msg-id CE20A918-FDF4-4D43-A969-6CBB70B69164@gmail.com
Whole thread Raw
In response to Re: Indexing on JSONB field not working  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Indexing on JSONB field not working  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: Indexing on JSONB field not working  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-bugs

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.


Oh. That explains it. I tweaked a few server parameters, wonder if that made the difference. I changed,

pg_stat_statements.track: ALL

track_activity_query_size: 2048

Now we have stats, can anyone see why the index is not used?

Thanks!

Zhihong

pgsql-bugs by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Indexing on JSONB field not working
Next
From: Tomas Vondra
Date:
Subject: Re: Indexing on JSONB field not working