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: 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-26 16:30:47
Message-ID: E0F0CF2B-46DB-425C-9338-0FA59561B6B6@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

That command yields nothing. If I use the tablename ‘assets’, it only returns stats on columns, nothing about indexes. The indexed field is in JSONB field ‘_doc’. This is the stats on the column,

select * from pg_stats where tablename='assets' and attname='_doc';
schemaname | tablename | attname | inherited | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation | most_common_elems | most_
common_elem_freqs | elem_count_histogram
------------+-----------+---------+-----------+-----------+-----------+------------+------------------+-------------------+------------------+-------------+-------------------+------
------------------+----------------------
public | assets | _doc | f | 0 | 18 | -1 | | | | | |
|
(1 row)

Let me know if you want any other information.

Zhihong

> On Dec 21, 2019, at 10:17 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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.
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Janes 2019-12-26 16:50:24 Re: Indexing on JSONB field not working
Previous Message Tom Lane 2019-12-26 15:27:27 Re: Indexing on JSONB field not working