Insert only table and size of GIN index JSONB field.

Поиск
Список
Период
Сортировка
От Maxim Boguk
Тема Insert only table and size of GIN index JSONB field.
Дата
Msg-id CAK-MWwTJyhvsRzoHwEKf8FbdZZur2fCZEdK3XNwmxoBjDTvSbg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Insert only table and size of GIN index JSONB field.  (Maxim Boguk <maxim.boguk@gmail.com>)
Re: Insert only table and size of GIN index JSONB field.  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
Hi,

I started with empty table with index over
 custom_fields | jsonb
field
defined as:
    "idx_learners_custom_fields" gin (custom_fields)
Globally gin_pending_list_limit set to 2MB.
Database version is 9.5.2.

Now question:
If table populated with 1M records in single transaction then the final size of the GIN index is:
4265 MB
but after I performed reindex index idx_learners_custom_fields;
the index size had been reduced 15x to 295 MB.

Is this behavior expected?

--
Maxim Boguk
Senior Postgresql DBA
http://www.postgresql-consulting.com/

Phone RU: +7 910 405 4718
Phone AU: +61 45 218 5678

LinkedIn: http://www.linkedin.com/pub/maksym-boguk/80/b99/b1b
Skype: maxim.boguk
Jabber: maxim.boguk@gmail.com

"People problems are solved with people.
If people cannot solve the problem, try technology.
People will then wish they'd listened at the first stage."


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

Предыдущее
От: "drum.lucas@gmail.com"
Дата:
Сообщение: (VERY) Slow Query - PostgreSQL 9.2
Следующее
От: Bill Moran
Дата:
Сообщение: Re: (VERY) Slow Query - PostgreSQL 9.2