public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bzzzz <[email protected]>
To: [email protected]
Subject: Re: hstore or jsonb ?
Date: Mon, 14 Nov 2022 22:21:13 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Mon, 14 Nov 2022 22:03:02 +0100
Laurenz Albe <[email protected]> wrote:
> 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.
Oh, I missed that, so jsonb it'll be.
> > 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.
One kind, that will be something like :
SELECT websearch_to_tsquery('english', 'switching power supply
output tension 5 Vcc 5 A') ;
This will be for external, internal queries will specify more to be
more accurate/restrictive.
I can't put specs into columns because they are very different from
one to another family of products, hence the use of json to keep them
as malleable as possible.
Jean-Yves
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: hstore or jsonb ?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox