Re: Indexing on JSONB field not working

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Indexing on JSONB field not working
Дата
Msg-id 4910.1577386715@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Indexing on JSONB field not working  (Zhihong Zhang <zhihong@gmail.com>)
Ответы Re: Indexing on JSONB field not working  (Zhihong Zhang <zhihong@gmail.com>)
Список pgsql-bugs
Zhihong Zhang <zhihong@gmail.com> writes:
> The index name is correct and I ran ‘analyze' multiple times since the index is created. I have dozen indexes, some
arecreated when table is created. None of them is in pg_stats. 

You still haven't shown us exactly what you're doing, only asserted that
you're doing the right thing, which seems somewhat unlikely given that
nobody has been able to reproduce this behavior based on what you've
told us so far.

One possible gotcha is indicated by this comment in analyze.c:

     * Open all indexes of the relation, and see if there are any analyzable
     * columns in the indexes.  We do not analyze index columns if there was
     * an explicit column list in the ANALYZE command, however.  If we are

that is, if you did something like "ANALYZE assets(_doc);" it would
not result in creation of stats for any expression indexes.

> The database is on AWS RDS. Does that make any difference?

Wouldn't have thought that their version of Postgres deviates much
from community Postgres.  If you were talking about Aurora or Redshift,
I can't speak to what those do.

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Kuldip Zalavadiya
Дата:
Сообщение: PostgreSQL Installation Error
Следующее
От: Zhihong Zhang
Дата:
Сообщение: Re: Indexing on JSONB field not working