Ask HN: Have you switched from Postgres or relational data to MongoDB?
I am dealing with data which is stored as JSONB data type in postgres currently. This column needed to be used in the `where` as filter. For example, a json can contain title, body, url, some boolean values etc.
While Postgres does allow creating an index on this JSONB column, I am wondering if MongoDB would be better suited for this instead of Postgres?
Have you switched any project from postgres or relational data to mongoDB or similar nosql db?
When dealing with JSON data, is Postgres better or MongoDB?
(
3 comments
| on HN
)
Will note that json/text columns are better than jsonb. Lower serialization overheads and surprisingly smaller binary size. Or better yet, just normalize to a columnar format.
https://medium.com/geekculture/postgres-jsonb-usage-and-perf...
Says that jsonb is better suited for my needs as I need it to be indexed for lots of searching. Almost all my queries will have a where clause on this jsonb column.
In other words Postgres is actually kind of expensive for serious use despite being “free.” It’s just something to be aware of. Kubernetes is another “free” system with this nature.
If I were starting a new project today I would look hard at cockroachdb. Its license is on paper less free than Postgres but in practice it’s more free for many use cases, and it’s a modern raft database with auto failover and pretty easy scaling.
Postgres feels like something from 1980s Unix. Everything is manual and clunky and very arcane.