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.
[ Parent
| on HN ]
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.
> (...) 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.
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.
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?
The benchmark should really compare Oracle to PostgreSQL with however much extra RAM the cost of an Oracle license would buy.
I think standard Oracle license prohibite benchmarking.