Re: Indexes in JSONB

2022-03-29 Thread Saurav Sarkar
Thanks a lot Magnus for the reply. I understand that jsonb_path_ops creates index on the whole path or on all the attributes. Does it takes more storage or reduces write performance in comparison to normal gin index ? On Tue, Mar 29, 2022 at 2:19 PM Magnus Hagander wrote: > > > On Tue, Mar 29,

Re: Indexes in JSONB

2022-03-29 Thread Michael Lewis
No matter what you do, you will not typically get the same level of performance as normalized tables as you do not get statistics on the values stored in your jsonb column. No knowledge of null fraction, number of distinct values, or most common values and their frequencies.

Re: Indexes in JSONB

2022-03-29 Thread Magnus Hagander
On Tue, Mar 29, 2022 at 7:06 AM Saurav Sarkar wrote: > Hi All, > > We use JSONB /NoSQL functionality of PostgreSQL. > > One of the column "doc" in our table "Table1" is of type JSONB. > > Now the rows in this column "doc" can have different values with different > schemas. > > For e.g values of d