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 1tbHXF-009SDc-9X for pgsql-general@arkaria.postgresql.org; Fri, 24 Jan 2025 11:07:37 +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 1tbHXC-00DZhb-Se for pgsql-general@arkaria.postgresql.org; Fri, 24 Jan 2025 11:07:34 +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 1tbHXC-00DZhR-Gg for pgsql-general@lists.postgresql.org; Fri, 24 Jan 2025 11:07:34 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tbHX9-001Fvk-2H for pgsql-general@lists.postgresql.org; Fri, 24 Jan 2025 11:07:34 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-30613802a59so21169461fa.0 for ; Fri, 24 Jan 2025 03:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737716850; x=1738321650; 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=neVgeFfVbd3FdS+gAqnJLUbQ+MIpR81fjWE7xRQ9NlM=; b=e9egL58PoWLCm3/ma28fprQJcR3YVqevGJlOhC+69bp8hhleNeLhdidWxVYPFLBgvc 2uTSCOO68hmyCa44p+mjaZbaWX3aIv7eyJC00q8qj5gWCplDJWgjHbAuA4MGw+YSDKgh HHMwB/2Odh0kMTWSVBvSBK5+tav6iRNnbWO4ECMyMsHr2Z/zImmQOvQ7+2JApg344lyI LacUMGs0u5Dnr91jBUgVV1iUG5+j1IW+FZCWTCOsfSAPOIFHqehIGD6jvIzCiiUImm2C NJoR9qYt1PaUAVEbioZIf3XjMFMxYrisvHCkPBVw/g+4eARHkp1QkN/Vsu9Udhn1rClM v89A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737716850; x=1738321650; 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=neVgeFfVbd3FdS+gAqnJLUbQ+MIpR81fjWE7xRQ9NlM=; b=eY8kK9r3K353ZpK21F5R7DXVouJ3GQ0pv2zxnr3D3z0CMGTTi3YZU0xrgqx5sBCXzh 9G5pFB30GyuC3xasxdETJmVQK7eJpEnmsb+Ai0t1Q9Z3aMby8PfupiTWbTsmaTbPOijh yDh+IPqvO04JvTvnTh05Cec7FhmGQjLCgGk29r0mwjQiPkWGFVNV7/S4pjy3DWbAh5Bp wG04lEP1sClqqAisxeDnvNUuxBd5G3u2i9tKsa2fh6W1TmwRalf76ZgTOsstwV64a8Dd P9a5ljGxJnsm1XQj26+cZe9v7tnUcw2XMPsFOZZNvwh6UoZN2kmTBUXueeD2LgKNHvgh cJXQ== X-Forwarded-Encrypted: i=1; AJvYcCUjZpTRvk2UnXHhy0BmjAkLG1rxVtzz4XNVdQnKeGuNAtaef3pqIqCYzj69XcUu2MDV1vfo+PTmMYmu1sWW@lists.postgresql.org X-Gm-Message-State: AOJu0Yx0czSuI+NlNRJfEyzp2PHXI0aVDH7iyMZ5OO3LJHnmwV1LTT6A yO9FRD5jp07fcYbDxxvqZqd4+vkSDNc13rEM0mhNmEwp5MDgHT8yWJHi2XKhnAaFPdpZOvelNmn EsyJya8PHt+amyhy4alKY9t8VDzofiF/6Rw== X-Gm-Gg: ASbGnctNW6BKBBgot0++66byGxYiE4T1+GteBvzdS4Pg7G3feuhsSiNsu5TZNv5eaYZ 70ajlpaH6l/qujAlnS5LEM4njJMwWofpkKvElz6SC55cySkmsbaGosDORpnC1BQ== X-Google-Smtp-Source: AGHT+IH1FSFQXeMxj4kDOVUYAsd9NNO3PzHG/4UqCiyW1ts81QMOowDqCl0RHMWGtpPZEz4MlOh6eFXR7ERKfdqhH6E= X-Received: by 2002:a05:651c:154b:b0:2ff:bd92:1d7d with SMTP id 38308e7fff4ca-3072cb1f7ccmr126142381fa.23.1737716849581; Fri, 24 Jan 2025 03:07:29 -0800 (PST) MIME-Version: 1.0 References: <93e769c5-e5d8-411d-b559-dc41534c1bc6@aklaver.com> In-Reply-To: From: =?UTF-8?Q?Torsten_F=C3=B6rtsch?= Date: Fri, 24 Jan 2025 12:07:18 +0100 X-Gm-Features: AWEUYZluHAfmYnRpGJGdP5RtD9P3HTrobgFdpx5KMNlEaSl4kCBzllPc-IqcTX8 Message-ID: Subject: Re: Is postgresql's json strong consistency or eventually consistency? To: anlex N Cc: Adrian Klaver , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000008a2408062c71bb72" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008a2408062c71bb72 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 24, 2025 at 4:48=E2=80=AFAM anlex N wrote= : > Hello Adrian, Laurenz. Have you tried postgresql's json in your everyday > life? How fast is it? how is it than mongodb? > My honest opinion, JSON(B) in PG is great as data transfer format but not so much for storage. Here is an example. Up to last year I had a table in my DB with rows consisting of a bunch of numbers in many columns. Over maybe 15 years of business that table had grown to a few TB in size. Then the development team decided they needed more flexibility and started to fill a new table with the same information in JSON. After only 1 year of business that table is now in the same size range. Another example, the developers came up with a new table to store the result of the JSON response they got from a 3rd party application. That worked for a while and the table behaved normally. Suddenly it started growing by a few GB a day. Turns out the 3rd party had decided to include an MB-sized picture in the JSON response. Our team then faithfully stored all of that crap unfiltered in the DB. That is not an answer to your original question, of course. How fast it is depends very much on the use case. If you are talking about access methods alone, the ability of indexing JSON and such, then PG is on par with mongo if not better. But nobody but you can give you a definite answer relating to your situation. --0000000000008a2408062c71bb72 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Jan 24, 202= 5 at 4:48=E2=80=AFAM anlex N <an0= 291170@gmail.com> wrote:
Hello=C2=A0Adrian,=C2=A0Laurenz. Have you tried postgresql's json = in your everyday life? How fast is it? how is it than mongodb?
<= /blockquote>

My honest opinion, JSON(B) in PG is great a= s data transfer format but not so much for storage. Here is an example. Up = to last year I had a table in my DB with rows consisting of a bunch=C2=A0of= numbers in many columns. Over maybe 15 years of business that table had gr= own to a few TB in size. Then the development team decided they needed more= flexibility and started to fill a new table with the same information in J= SON. After only 1 year of business that table is now in the same size range= .

Another example, the developers came up with a n= ew table to store the result of the JSON response they got from a 3rd party= application. That worked for a while and the table behaved normally. Sudde= nly it started growing by a few GB a day. Turns out the 3rd party had decid= ed to include an MB-sized picture in the JSON response. Our team then faith= fully stored all of that crap unfiltered in the DB.

That is not an answer to your original question, of course. How fast it i= s depends very much on the use case. If you are talking about access method= s alone, the ability of indexing JSON and such, then PG is on par with mong= o if not better. But nobody=C2=A0but you=C2=A0can give you a definite answe= r relating to your situation.
--0000000000008a2408062c71bb72--