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 1ubPDR-000PZK-1Q for pgsql-general@arkaria.postgresql.org; Mon, 14 Jul 2025 19:51:57 +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 1ubPDP-00Cpky-44 for pgsql-general@arkaria.postgresql.org; Mon, 14 Jul 2025 19:51:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubPDO-00Cpkg-Pa for pgsql-general@lists.postgresql.org; Mon, 14 Jul 2025 19:51:55 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ubPDN-007iC3-1F for pgsql-general@lists.postgresql.org; Mon, 14 Jul 2025 19:51:55 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-60c4f796446so6980705a12.1 for ; Mon, 14 Jul 2025 12:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752522712; x=1753127512; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qhtfRDmxD7/5EphC3YMJyM1WLnva8/4ccWC2fJXh75s=; b=cm3OMZlL0xSYW57tuoolcfuxiRco8C+bnqTgTcI7XyElaBALdYT3JHkHCpkxxwl/FY +F0GZjgsRi3gy/RmaTPloDBl+UsQJA9mehWWLPDRb6TP6KUJbRprOoMVV+ObE4lre7e6 vzumzZ585wepGoHDj69ecLLRIT2ySlk+kA+7vjjEk3QNdW3RFaOkZaGwdrfuNUC1Prgc BAhSk6/IoA/7XUC+tDm1FIbtZRzmVLCfhLqHx2aPD1bdowDaGQBc5mSTPpw08s59Koxo wJY567u/bVBntLtbm+bdYPMqJIbJbVcXbKUBAAUK+pjDxkY1GKuDcShObCDocf6u8VCH vu6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752522712; x=1753127512; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qhtfRDmxD7/5EphC3YMJyM1WLnva8/4ccWC2fJXh75s=; b=NRJFvOcSfiHhn86Efg+7f5XiX9JSDsfiPQrwwul6d6ucmdoFbld05CbZRXg1iHbr0K 135RVVaPJFgK6Ne84U4U1+DoS0SZdxuCdwWQ9hfapxJE2Nqxa7paYr3tEdpwPNW0Nz03 N/YsOaUemmcdW+YtfERHrTENQPlS9Ekdp2i4nGf+McEKy5igTsVidLJQGLZB5iN/UL2T +Pmd2FnL7suJDVo9shrkj/b5OU9mv5cLTPliSqdKtHaoWYZlD24Ai6eCiMN4E4a04wlh t7GmwYX5ekA5arrjr3NGBmSSBGy5w4Z/oI1Zlt7Ek2tLqZ/DQ9i0v7skjLap0LleCOWr 06gg== X-Gm-Message-State: AOJu0Yy/nwwNYpKwJtiSAs3exqD+OsZR9rqhgGr2FYLGt+swgxNVHRA/ QTVVE8lQzXGS2ARtKgCWIpZfO1olwo9WoDTGwut7QCKP0aKHEtXheS+q3IYkMxeqglSKBdoq/0x A3PVU5lQ9+zzwWDSSTPORB5/uF4zdoqJT99pd X-Gm-Gg: ASbGncst/kG0Tuzvg20lidj2stEF/GMFGLLY2AgNecSv78NO3I/HAQwebu9CRXW9I82 OrJ/d4qHmRU/GOqk7/VAGOeIH0Z3O7UAxzelTXvk3CFn5pdBG5V6zeTF6wA16gQSAC4QEeebt3S 3y1IuoaIF6ApCmJV2ZfEUHLLs0c51dtE7o5Hvzgyx/Phtn1fQWMrEL5e75rcIhzMvbCuJdvPRTU c5EV4xF3mBztSbszkqSuycgjnOrfMvKs5OSLt2vWA== X-Google-Smtp-Source: AGHT+IExqn0IFkEXbIyWRIxDR/4VSKKF/43hqR3aSYypFZyc0dvigCefXr5YZZftcmJsVEPBnzZWMX79/K4IPgf1H8E= X-Received: by 2002:a17:907:3da3:b0:ae0:b46b:decd with SMTP id a640c23a62f3a-ae6fbf7143cmr1521192266b.31.1752522712135; Mon, 14 Jul 2025 12:51:52 -0700 (PDT) MIME-Version: 1.0 From: veem v Date: Tue, 15 Jul 2025 01:21:38 +0530 X-Gm-Features: Ac12FXy7oJp5p8g9lT-lKJZ6ZlBASRrnHgYcog9xoCXrm_JC-6K5MDQbLl9pyRE Message-ID: Subject: Performance of JSON type in postgres To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000b7be540639e8fd93" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b7be540639e8fd93 Content-Type: text/plain; charset="UTF-8" Hi, It's postgres 15+. And need guidance on JSON types, (for both on premise vanilla postgres installation and AWS cloud based RDS/aurora postgres installations). I have never worked on a JSON data type in the past. But now in one of the scenarios the team wants to use it and thus want to understand if there are any pros/cons in using JSONB vs JSON in postgres. Is there a specific scenario in which one should use one vs other. Any storage or performance threshold or limitations if any exists etc? Even some team mates suggest storing it simply in string data types. So I want to understand the experts' opinion on this which I believe will be crucial during design itself. Regards Veem --000000000000b7be540639e8fd93 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
It's postgres 15+. And need guidance on JSON ty= pes, (for both on premise vanilla postgres installation and AWS cloud based= RDS/aurora postgres installations).

I have never worked on a JSON = data type in the past. But now in one of the scenarios the team wants to us= e it and thus want to understand if there are any pros/cons in using JSONB = vs JSON in postgres. Is there a specific scenario in which one should use o= ne vs other. Any storage or performance threshold or limitations if any exi= sts etc? Even some team mates suggest storing it simply in string data type= s. So I want to understand the experts' opinion on this which=C2=A0I be= lieve=C2=A0will=C2=A0 be crucial=C2=A0during design itself.

Regards
Veem
--000000000000b7be540639e8fd93--