public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Divyansh Gupta JNsThMAudy <[email protected]>
Cc: [email protected]
Subject: Re: Need help in database design
Date: Mon, 23 Dec 2024 09:07:12 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHesJ5JLzhHiGSBSkJZ7x7rGgHeeByP=wWk1D5GG=x8cJ5YY6Q@mail.gmail.com>
References: <CAHesJ5LES3aTDf=xp7NOwrADQ_HWC-Spsv7yLu9ZY+zxzZO53A@mail.gmail.com>
<[email protected]>
<CAHesJ5+ASNoSNMiC5Ms0Ts=gw7v2_UeBpUT=phujO4yE_XCbEw@mail.gmail.com>
<CAHesJ5JbkCBZ2f_AvUr8+KWnGPAsobu4zyfnWm8bEeb7X9oqDQ@mail.gmail.com>
<[email protected]>
<CAHesJ5JLzhHiGSBSkJZ7x7rGgHeeByP=wWk1D5GG=x8cJ5YY6Q@mail.gmail.com>
On 12/23/24 09:01, Divyansh Gupta JNsThMAudy wrote:
> Sure , for example, I have 50 key with name as t1 , t2 ,t3 .......t50
>
> Now each key could have values from 0 to 3
>
> So let suppose we have JSONB like that for row r1
>
> {
>
> t1: 1
>
> t2: 2
>
> t3 : 3
>
> }
>
>
> As if I convert it into columns so r1 will have
>
> t1 column will contain 1
>
> t2 column will contain 2
>
> ...... So on
>
>
> So here my question is considering one JSONB column is perfect or
> considering 50 columns will be more optimised.
>
1) How are you going to use the key:value pairs in queries?
2) I would recommend creating a sample dataset that you import into
tables that are built with either the column method or the JSON method
and test a representative set of queries.
--
Adrian Klaver
[email protected]
view thread (13+ 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], [email protected]
Subject: Re: Need help in database design
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