News for hackers. Stuff that matters.
Re:Bye Bye Mongo, Hello Postgres (2018) by makkesk8 on Sunday December 27, 2020 @11:01AM (#25551860)
One big drawback of postgres when updating data in a jsonb column is that it needs to rewrite everything even when you update the value of a single key, this gets very expensive if you need to update many rows. As far as I can tell, Mongodb handles this better. Other than this I also prefer postgres despite this limitation.
Re:Bye Bye Mongo, Hello Postgres (2018) by jabberwcky on Sunday December 27, 2020 @11:20AM (#25552012)
Mongo stores objects pretty much the same as PG here, a single key update requires a rewrite of the object. Maybe Mongo has some fancy algorithms to avoid full decode/reencode in some cases, but in principle the physical data formats are almost identical
Re:Bye Bye Mongo, Hello Postgres (2018) by isbvhodnvemrwvn on Sunday December 27, 2020 @12:47PM (#25552733)
In a tiny bit more detail - mongo uses BSON, which is effectively TLV encoded json. I'm not sure how storage of entire collections is done though.

https://en.wikipedia.org/wiki/BSON

Re:Bye Bye Mongo, Hello Postgres (2018) by rualca on Sunday December 27, 2020 @03:10PM (#25553858)
> (...) BSON, which is effectively TLV encoded json.

For those who, like me, never heard of TLV prior to this post, it's type-length-value encoding.

https://en.wikipedia.org/wiki/Type-length-value

Re:Bye Bye Mongo, Hello Postgres (2018) by swyx on Saturday January 02, 2021 @11:25PM (#25619431)
thanks for the link, you weren't alone
Re:Bye Bye Mongo, Hello Postgres (2018) by karsinkk on Sunday December 27, 2020 @01:15PM (#25552979)
Disclaimer : I'm a Software Engineer at Oracle

In Oracle 21c and the Autonomous JSON Database, we introduced a new Native JSON Datatype with it's own Binary Storage format called OSON[1]. With OSON, you can perform partial updates on a json document. The added benefit is that this results in significantly lesser redo log size.

[1] https://blogs.oracle.com/jsondb/osonformat

Re:Bye Bye Mongo, Hello Postgres (2018) by dan-robertson on Sunday December 27, 2020 @02:15PM (#25553457)
Are there any (independent) benchmarks for how the performance of this compares to other database management systems?
Re:Bye Bye Mongo, Hello Postgres (2018) by twic on Sunday December 27, 2020 @02:31PM (#25553573)
The benchmark should really compare Oracle to PostgreSQL with however much extra RAM the cost of an Oracle license would buy.
Re:Bye Bye Mongo, Hello Postgres (2018) by j16sdiz on Sunday December 27, 2020 @02:18PM (#25553474)
I think standard Oracle license prohibite benchmarking.
Re:Bye Bye Mongo, Hello Postgres (2018) by samb1729 on Sunday December 27, 2020 @07:53PM (#25555682)
This sounds like a fantastic reason among many to actively resist ever using their software.