19 ms·
> 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 c
by majewsky 10y ago
> 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.
- fabian2k 10y agoThere 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.
- kuschku 10y agoActually, 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 https://dl.kuschku.de/videos/2016-09-16_04-03-36.mp4 Postgres is, for smaller amounts of data, more than fast enough.