Re: Indexing on JSONB field not working

From: Zhihong Zhang <zhihong(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(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:59:07
Message-ID: CE20A918-FDF4-4D43-A969-6CBB70B69164@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2019-12-28 23:56:04 Re: Indexing on JSONB field not working
Previous Message Jeff Janes 2019-12-28 19:15:29 Re: Indexing on JSONB field not working