Re: Indexing on JSONB field not working

Zhihong Zhang <[email protected]> Thu, 26 Dec 2019 11:30:47 -0500
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <[email protected]>
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 <[email protected]> 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.
>