Re: Is postgresql's json strong consistency or eventually consistency?

From: Torsten Förtsch <tfoertsch123(at)gmail(dot)com>
To: anlex N <an0291170(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Is postgresql's json strong consistency or eventually consistency?
Date: 2025-01-24 11:07:18
Message-ID: CAKkG4_m_O_=o8uBQu3ox-ZxF61mzHLSB+Q6GkvHfyAQyPRZmkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 24, 2025 at 4:48 AM anlex N <an0291170(at)gmail(dot)com> 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul Brindusa 2025-01-24 11:20:22 Re: Return of the pg_wal issue..
Previous Message Torsten Förtsch 2025-01-24 10:40:10 Re: Is postgresql's json strong consistency or eventually consistency?