Live data from Hacker News

The Great Migration from MongoDB to PostgreSQL

infisical.com

161–170 of 339 posts

Re: The Great Migration from MongoDB to PostgreSQL

#162
> With MongoDB, we lost out on many nice features from the relational world ...

> ... this hurt in particular because our data was very much relational.

That is my best attempt at the summary.

The write-up is good, but after you've been around a long (long) time ... you know what this is likely going to involve.

Glad relational SQL is still going strong 50 years later.

Re: The Great Migration from MongoDB to PostgreSQL

#163
post #155

Earlier quoted context omitted.

That mirrors my experience. MySQL was faster for use cases where data loss was acceptable. Will anyone die if you lose some web log analysis stats? Probably not. You wouldn’t want to use it for anything where guaranteed consistency was critical, like anything involving money, but it was an alright replacement for things like an in-memory data store. I say “was”. I hear it’s vastly better now.

If you want a fast DB for web log analysis, you shouldn't look at MySQL or PostgreSQL anyway. ClickHouse will run circles around both of them for the use case of web log analysis.

That was an example of the sort of thing that someone might reasonably have used MySQL+MyISAM for in the past. I wouldn’t use that combination at all today.

Re: The Great Migration from MongoDB to PostgreSQL

#164

Earlier quoted context omitted.

Oracle

Anybody that has ever used Oracle knows how nice it is. But very few people have that experience because their company isn't spending millions of dollars on the database server.

Yes, that was my point.

I get that working with Oracle and their army of lawyers is not cheap or pleasant but the db is still excellent.

Re: The Great Migration from MongoDB to PostgreSQL

#166
post #40

Earlier quoted context omitted.

Document databases aren't an inherently bad idea. They have their uses. I'm using mongodb because it fits my use case: the app is very front-end oriented, and the data the user needs on a specific page fits neatly in one document. There are (quite a lot) related documents, but they are only needed in specific parts of the app, and that's when those are retrieved. Pretty simple. I could argue that in-server SQLite is…

What about a Postgres database where you store your documents in a key value table of json objects? What mongodb benefits would you be missing?

What benefit does switching to postgresql bring? When mongodb stops being maintained, I'll consider postgres, but until then, I now only see downsides.

Re: The Great Migration from MongoDB to PostgreSQL

#167

I remember well how in the early 2000s everybody wanted to get away from their relational systems and NoSQL (Not only SQL) databases were the latest fashion. Looks like we have come full cycle.

A fad that set back the industry by a decade.

Not sure on that, it made some of the SQL solutions innovate quite a bit.

Re: The Great Migration from MongoDB to PostgreSQL

#168
post #31

The irony of it all is that MongoDB actually matured and you do not have to jump through hoops to have, say, transactions. I am ALL for Postgres, I even wrote a post about the importance of being fluent in relational databases: https://renegadeotter.com/2023/11/12/your-database-skills-ar... What grinds my gears is the whiplash caused by this frantic stampede from one hype to the next. I am just waiting for the AI hyp…

Postgres is no hype, it was already in plateau of productivity when MongoDB came to the web scale scene. Hadoop just like Mongo had their hyped time in the sun, but RDBMS are far too advanced and versatile than any of them were.

MongoDB is more popular that it ever has been. You can look at their quarterly filings and learn this. The NoSQL space is larger than it ever has been and is the fastest growing segment in the database world.

Re: The Great Migration from MongoDB to PostgreSQL

#169
post #148

Earlier quoted context omitted.

> To be fair, almost all product PR teams do the same. No, mongodb’s PR approach and results were largely uncommon at the time. They didn’t advertise directly but instead targeted and amplified dev communities - as detailed in the article linked earlier. The result was that people not associated with mongodb talked about mongodb at various dev conferences and in blog posts. People didn’t want to listen to PR teams th…

Again, I will stick to saying that if you use technology you have no experience with, the problems resulting from it are on you. Testing out technology on important projects is reckless and is a risk a lot of people take but push away any responsibility for. As a professional, before I suggest to use a technology at a project, at first at the very minimum I spend some time with it to learn the ins and outs. Every tec…

The funny thing is that they chose Mongo precisely because they were familiar with it...

Re: The Great Migration from MongoDB to PostgreSQL

#170

This seems to gloss over the actual rewrite. How did you ensure queries were equivalent? How did you configure the product to be able to read from and write to both databases? Did migrating reveal any bugs? Were you largely able to port your queries 1:1?

Hopefully they had comprehensive test coverage. That would have helped greatly in that regard.
Post reply on HN