Re: Indexing on JSONB field not working

From: Zhihong Zhang <zhihong(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Indexing on JSONB field not working
Date: 2019-12-29 01:40:24
Message-ID: 23FF633F-FFF8-4ABE-BCE6-4FF1E1772A26@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The stats was sent in a previous email. Let me know if you can’t find it.

Zhihong

> On Dec 28, 2019, at 6:56 PM, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
>
> On Sat, Dec 28, 2019 at 02:59:07PM -0500, Zhihong Zhang wrote:
>>>
>>> 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?
>>
>
> I don't follow. Neither of these configuration options should affect
> which indexes have stats. The expression index should have stats no
> matter how these two GUCs are set.
>
> But once again, you're making claims without actually showing us the
> data. How do you know we have stats now? Show us pg_stats data and
> the explain plans.
>
>
> regards
>
> --
> Tomas Vondra http://www.2ndQuadrant.com
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2019-12-29 12:37:15 Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema
Previous Message Tomas Vondra 2019-12-28 23:56:04 Re: Indexing on JSONB field not working