Re: hstore or jsonb ? - Mailing list pgsql-novice

From Laurenz Albe
Subject Re: hstore or jsonb ?
Date
Msg-id b9cf20b7b7f28c226d7f7980c352449793acf14e.camel@cybertec.at
Whole thread Raw
In response to hstore or jsonb ?  (Bzzzz <lazyvirus@gmx.com>)
Responses Re: hstore or jsonb ?  (Bzzzz <lazyvirus@gmx.com>)
Re: hstore or jsonb ?  (Bzzzz <lazyvirus@gmx.com>)
Re: hstore or jsonb ?  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-novice
On Mon, 2022-11-14 at 15:50 +0100, Bzzzz wrote:
> I'd like to store specs, as they vary a lot from one item to another,
> hstore or jsonb look like the best solution.
> 
> Specs can have 2 levels at most.
> ie: "color": ["white", "black", "blue"]).
> 
> The indexation is mandatory for fulltext accurate researches in
> (almost) natural language.
> 
> So, as the processing is almost the same (maps I/O in Erlang), which one
> would be the best for my needs, hstore or jsonb ?

"hstore" is obsolete; don't use it.

> Also, from what I read, the both of them can be easily indexed, but
> which index is the best, GIN or RUM ?
> 
> And furthermore, which index option (XXX_ops), if any, would be the best
> for the chosen one ?

That depends on the query you need to support.

I have no idea what you mean by "fulltext accurate search" in a hstore
or JSON.

Yours,
Laurenz Albe



pgsql-novice by date:

Previous
From: Bzzzz
Date:
Subject: hstore or jsonb ?
Next
From: Bzzzz
Date:
Subject: Re: hstore or jsonb ?