Hacker News new | comments | show | ask | jobs | submit login

In the early days of companies MongoDB has helped me tremendously with development speed because it is schemaless. Since Postgres 9.5 I'm trying to replicate the speed with Postgres binary JSON but most access libraries are still SQL oriented and I haven't achieved the speed of MongoDB with Scala/Rogue yet.



I must admit that the term 'schema-less database' sends shivers up my spine. How do you manage that, especially in a large development team. My biggest fear is that someone will make a change to the structure in an ad-hoc fashion which may break something else I am working on.

End of the day, can't most things in the real universe be broken down into a schema? Be it DNA mapping, geological data, customer invoices, product listings etc.? Everything eventually can be contained in a discrete, defined schema?

I've dabbled on and off for several years but have yet to come across one situation where NoSQL would be a better solution than SQL. As others have pointed out - as soon as you start relating table together, NoSQL starts working against you.

I acknowledge that I have 30+ years with SQL, so obviously my viewpoint is biased by what I know. Could the hesitation to adopt SQL by most new developers point to the fact that they find it too intimidating and structured?


> I've dabbled on and off for several years but have yet to come across one situation where NoSQL would be a better solution than SQL.

Full-text search. Just compare the speed of ElasticSearch against "SELECT * FROM logs WHERE message LIKE '%foo%';".

Also other niches: time-series databases, graph databases, etc.


Actually, I’ve done tests with an indexed postgres database of several gigabytes size and tsvector for stemming and co vs. ElasticSearch.

At least until you reach several hundred gigabytes, postgres uses less resources for the same search speed.

This video shows searching through 3 GB of IRC logs, filtering, ranking them based on similarity to the query, creation time, likelyhood that it’s the type of message the user wants, highlighting the part of the message with the matching words, and displaying all that:

https://dl.kuschku.de/videos/2016-09-16_04-03-36.mp4

Postgres is, for smaller amounts of data, more than fast enough.


There are much more powerful ways to do full text search in SQL databases than LIKE. A fair comparison would be something like a PostgreSQL tsvector with a GIN index. Probably not as good as ElasticSearch, but sufficient for simpler cases.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: