Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tPlun-00FAxS-EO for pgsql-general@arkaria.postgresql.org; Mon, 23 Dec 2024 17:08:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tPlum-00CxtL-OM for pgsql-general@arkaria.postgresql.org; Mon, 23 Dec 2024 17:08:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tPlum-00CxqM-Dl for pgsql-general@lists.postgresql.org; Mon, 23 Dec 2024 17:08:20 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tPluk-000D2b-2n for pgsql-general@lists.postgresql.org; Mon, 23 Dec 2024 17:08:19 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-2a3d8857a2bso2197568fac.1 for ; Mon, 23 Dec 2024 09:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734973698; x=1735578498; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cJVMIkoxd1qAHLEI03lgJ0KCDIW/H2zEdvdtikkQerc=; b=b1Y5W6bzsasDrg5l76FDi7MOW+hN8ED8O72jvbuy5fBxHCdkvRDGhLDZ68x24hVwDl bpDFFtbM94AJeoHRgpfNa8PaJelxTm1ozk4Acg/YsxSwgJizr1p17IfVlvw0I76PuhwZ y07dR8TR+ulCz1r/ulWFEIQXmQH/rZk7Cx/oPo9qwjoQT7ANNVCcb8s1D7TJZo4PSrMg 4BoVI9Ra+sTFfhP6L9m8XX7f3ryGTAYxMDq1jBPnS9mnHNpgX0baSj3CLilk/mNtpDbb idmTiWkdJoRiiJCM0TVQT3rAUlUWNQe8etKNVM9D+foSVPsQz9R+1B7i5LBy+tg7min1 fwLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734973698; x=1735578498; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cJVMIkoxd1qAHLEI03lgJ0KCDIW/H2zEdvdtikkQerc=; b=MN/Sp9/rHRGtSTZoROZ58SZbxCOlKWarT/sas4eY226d7GWe2O4mWOFLHMZIKfx6aM 72qCyxAiBAWxh1DPDcktym1j995bFpw12ZSnTP3Eah0T+IVn43GOfL4VfpAI6UCO+bIz 1aibCNfEMvbHXUcPEaHBF/LBg89pmhObGNb1uEZRQMWMOHZnLtWEgtfFosC3CiEY08ie qFhfbgjSCxMv0xgPEHqpD5117NgeRge6Sq+ck4rkXVNYZEYKly6KOYioyRlwnZieTtp/ A3doiaw6x5gDnF5c0dU2h1rwosX+K/opESiIqdbqq9luuH6qwFc4AXrjhPSz35kUxMRO v4Iw== X-Forwarded-Encrypted: i=1; AJvYcCWczZCgk31bmOzrw+HutBMFbIQgxmPZntoh37TMN+3Hd7XlWOasupcZpa66my3yOoNy2icjyEYrkGPOPH/9@lists.postgresql.org X-Gm-Message-State: AOJu0YxIt5Fua07EBgf9A+MsvBaqvRaePtXokyEBlBJ1/QjUXXK5d401 QJ6MDLOzKJU4UX88uSC6sb6/1luopa/Npbxg5Nv4VXjA23Kkk84kBAzsBg54GULWjEk2gyA6936 nJP46ut0kZW0IYsFok5g1CPNv2zk= X-Gm-Gg: ASbGncv8gZEtjK9/eTieVxzKJcn1zzduJ9FxjOl/iZIwZUVo8hQ4PHLDCp2Fmr0QDZ8 pzJRg3Ponggy3R/kcUMAwSMzXd8PULexTV2zAPzs= X-Google-Smtp-Source: AGHT+IFvvMs2w5DBucbhPPGIJqlVVisTh4uPXqSNwWWrhh693CJZP9N5/W3KeE+hh7k/qiXCjtGWZOR2WUasNqF93Tg= X-Received: by 2002:a05:6871:e418:b0:29e:1b70:95cf with SMTP id 586e51a60fabf-2a7fb553ec1mr6976272fac.40.1734973698376; Mon, 23 Dec 2024 09:08:18 -0800 (PST) MIME-Version: 1.0 References: <06e1f1ee-74b2-43a2-9a63-da20ae455ae2@aklaver.com> In-Reply-To: From: "David G. Johnston" Date: Mon, 23 Dec 2024 10:08:09 -0700 Message-ID: Subject: Re: Need help in database design To: Divyansh Gupta JNsThMAudy Cc: Adrian Klaver , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000fc8e100629f30a9d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fc8e100629f30a9d Content-Type: text/plain; charset="UTF-8" On Mon, Dec 23, 2024, 10:01 Divyansh Gupta JNsThMAudy wrote: > > So here my question is considering one JSONB column is perfect or > considering 50 columns will be more optimised. > The relational database engine is designed around the column-based approach. Especially if the columns are generally unchanging, combined with using fixed-width data types. David J. --000000000000fc8e100629f30a9d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Dec 23, 2024, 10= :01 Divyansh Gupta JNsThMAudy <ag= 1567827@gmail.com> wrote:


So here my question is co= nsidering one JSONB column is perfect or considering 50 columns will be mor= e optimised.

The relational d= atabase engine is designed around the column-based approach.=C2=A0 Especial= ly if the columns are generally unchanging, combined with using fixed-width= data types.

David J.

--000000000000fc8e100629f30a9d--