Live data from Hacker News

Just use Postgres

mccue.dev

211–220 of 238 posts

Re: Just use Postgres

#211
Here we go again... Just use X, forever, in all cases, is misguided whatever X is - a database, programming language, ... a vehicle.

PostgreSQL is good for many things and default to PostgreSQL and use something else if clearly justified is a sound advice, but assuming there is no room for anything else but PostgreSQL is not.

Re: Just use Postgres

#212

> If you see a college student or fresh grad using MongoDB stop them. They need help. They have been led astray. I like this sentence way more than I should.

Me too. I'll give you one counter-argument, though: maybe it's hard to appreciate all of the problems a traditional SQL RDBMS solves until you try and solve them without an RDBMS... and crash and burn badly. But, if they're actually building a real product with real funding money and they only know MongoDB... yeah, it's intervention time.

I would not wish this on anybody.

Re: Just use Postgres

#213

For everyone saying, “Just use SQLite”, how do you deal with pathological queries causing a denial of service? SQLite is synchronous, so you end up blocking your entire application when a query takes a long time. It’s a problem in Postgres, too, especially if the query involves table locks, but your app can Postgres can generally hobble along.

If your app is sane (== uses threads for blocking IO operations) then this does not happen.

Re: Just use Postgres

#214
post #198

Almost all statements about MongoDB are wrong. > You know exactly what your app needs to do, up-front No one does. Mongodb still perfectly fits. > You know exactly what your access patterns will be, up-front This one also no one knows when they start. We successfully scaled MongoDB from a few users a day to millions of queries an hour. > You have a known need to scale to really large sizes of data This is exactly a g…

> This is exactly a great point. When data size goes to a billion rows, Postgres is tough. You’ve been led astray. You can handle a billion rows on a developer laptop, let alone a production grade instance.

Depends on row width. 10KB JSON fields are all too common.

Re: Just use Postgres

#215
post #28

Earlier quoted context omitted.

I don’t. How are new grads supposed to learn the ups and downs of different choices they make? Just being told they’re led astray in a blog post isn’t gonna work - it’ll backfire. I used node as a new grad for things it wasn’t meant for and that’s how I learned what it is good at and what it isn’t.

Out of curiousity what were the things you shouldn't have used node for?

I‘d also like to know. I have yet to run into anything Node can’t handle

Re: Just use Postgres

#216
post #40

Earlier quoted context omitted.

> They have been led astray. They haven't though. What's wrong with using a tool even if it might be bad? Especially as a fresh user. It's how we learn. From both good and bad experiences. > They need help. Sadly it's not the fresh grad, but the "experienced" that only keep their old experiences that need help. Is this comment from 2010? MongoDB has improved. Maybe not to the point of being the best but definitely no…

MongoDB salesdroids rely heavily on you having a low familiarity with other database tech to spin themselves as the only game in town. "Being led astray" isn't a passive, ambient occurence, and it makes sense to push back against it.

On the other hand I know of multiple databases where all tables had attribute_1, attribute_2,..., attribute_5 columns Just in Case™

But more seriously the one feature I like in MongoDB is the pipeline API, where you can express a complex query with multiple filters/aggregations/transformations/joins as a list of simple steps.

There are some use cases where it is very ergonomic (even if I suspect that mongo can easily lose indexes along the steps so pretty performance might not be super intuitive)

Re: Just use Postgres

#217
post #136
post #55

Earlier quoted context omitted.

> Especially as a fresh user. It's how we learn. From both good and bad experiences. I'd do that, but a superior strategy is letting other people make mistakes and then learning from them. It is best to always be making choices that seem like they could be optimal, with very rare exceptions.

> but a superior strategy is letting other people make mistakes and then learning from them If this was a superior strategy that was so obvious no 1 would be making mistakes so how does this work? Not everything is strictly better. And by that logic... >> the superior strategy is letting other people comment (and make mistakes) and then learn from them i.e. don't read the post until years later to ensure you have all…

> If this was a superior strategy that was so obvious no 1 would be making mistakes so how does this work?

Either people aren't aware of an optimal strategy (if one exists) or they ignore it for various reason.

The latter is surprisingly common. People know they should exercise, get enough sleep, eat healthy, stay hydrated, tackle high priority tasks instead of procrastinating, etc. - and yet they still aren't doing those things (or as much as they should).

Knowing something is not enough.

Re: Just use Postgres

#218
post #161
post #53

Earlier quoted context omitted.

Many claim that MySQL with default configs had various advantages over postgres with default config and that it had a far better replication story

MySQL would also silently lose your data

You win some you lose some

Re: Just use Postgres

#219
post #184
post #18

> AI is a bubble why does it even matter? I know that I need multimodal search in my product, and that is why I need vector DB. You're not saying anything interesting by saying "AI is a bubble". If you say something like I may not actually need RAG/mutimodal/semantic search/dedicated vector db then you may have my attention.

Where does the funding for the companies developing those databases come from? I do not know enough about vector search to assert pgvector is enough for you, but I do know enough about supply chains to get woozy

so like if the funding for AI disappears then somehow my requirement of multimodal search also disappears, and with it all the existing solutions, some NOT VC funded, like pgvector?

Re: Just use Postgres

#220
post #27

Earlier quoted context omitted.

20 years ago LAMP (Linux, Apache, MySQL, PHP) stack ~is~ was the most common combo of the web

Not sure about Apache, but Linux, MySQL and PHP is still the most common combo in terms of number of sites running it. Wordpress alone is enough to establish that.

> most common combo in terms of number of sites running it. Wordpress...

does that claim do anything for anyone? India is the most populated country on earth, so?

Post reply on HN