4 ms·
> MongoDB being a NoSQL database using dictionary has a much more flexible structure. Not really, Postgres has hstore[0] which provides query-able schemaless k
by masklinn 15y ago
> MongoDB being a NoSQL database using dictionary has a much more flexible structure.
Not really, Postgres has hstore[0] which provides query-able schemaless key:value storage.
Furthermore, testing is done with 8.4, current version of Postgres is 9.2 and has further performance improvements over 8.4 (and more flexibility for "unsafe" data storage in the form of unlogged tables).
Finally, no note on the configuration of Postgres and whether it's been tuned correctly, only leaving the inference that he's using the default configuration... which isn't exactly performant.
[0] http://www.postgresql.org/docs/9.0/static/hstore.html http://www.postgresql.org/docs/9.0/static/hstore.html
- lobster_johnson 15y agoHe was using the default config, says so in the comments section. He also says in the comments that he did not know you could index case-insensitively in Postgres. This article is completely worthless.
- fdr 15y agoNot completely worthless: it does say something about the ease of getting good performance without having to know much about the ecosystem. But it doesn't speak to even the first "easy" 80% of what one would do to optimize performance, though. I appreciate this work with numbers, and the code to run it. I'm sure it can be adapted to take on these two suggestions.
- bsg75 15y ago> it does say something about the ease of getting good performance without having to know much about the ecosystem The root cause of most "I used [MongoDB,PostgreSQL,MySQL,CouchDB,...) and my site fell over" articles.
- lobster_johnson 15y ago"Getting good performance without having to know much about the ecosystem" is pointless, because choosing a tool is all about learning how to wield it. It's true about any tool, even something like a hammer. Software is complicated stuff and not something to treat superficially. Like everything in life, optimum results require a deep understanding. This article is worthless because the results are not useful to anyone for anything. Doing serious benchmarks requires a particular and fairly rare set of skills.
- fdr 15y ago> "Getting good performance without having to know much about the ecosystem" is pointless, because choosing a tool is all about learning how to wield it. It's true about any tool, even something like a hammer. There is no complete understanding of any non-trivial system, even for its authors. There is a question of how much one can understand in a reasonable amount of time, and what fraction of a perceived ideal one can achieve. Some systems have steeper curves than others. > This article is worthless because the results are not useful to anyone for anything. Doing serious benchmarks requires a particular and fairly rare set of skills. It is not worthless because there is some code posted to run it. Someone could beef up the corpus (it's pretty small right now) and apply their tweaks (or try other data types like hstore, or other indexing strategies). This person tried his/her best and put something together. I agree the benchmark is pretty flawed, but given the thankless (and often adversarial!) nature of running benchmarks and publishing results, I'm grateful for anyone who does one and then publishes the code.
- masklinn 15y ago> This article is completely worthless. Well it basically says that a worst-case situation Postgres still manages to keep up with MongoDB.
- lusr 15y agoPerformance with concurrent requests is also not addressed, which seems crucially important for a web application and the area I'd expect to see the most interesting differences.
- scorpioxy 15y agoDo you happen to know the performance characteristics of hstore? I use mongo for some analytics but it doesn't perform well on big datasets(not mongo's fault, memory on the machine is limited). I was wondering if hstore can replace it. I read somewhere on the mailing list that hstore doesn't perform well on big datasets( > 500,000 i think). Is that still true? If there are no benchmarks, I am going to do them myself.
- fdr 15y agoAs is always the case, disk I/O rather sucks for performance. On the other hand, Postgres's I/O scheduling -- while far from state of the art compared to proprietary databases -- is probably better than leaving it to the operating system entirely, particularly for writing. 500,000 small hstores should perform just fine. We have tables with millions or quite possibly billions of not-entirely trivially sized hstores sitting around on a pretty unremarkable machine with a few indexes. Hstore's storage format is probably not tuned as carefully (it's basically text) as bson, and yet its indexing can be richer (GIN/GiST). Binary formats can be overrated, though, especially when the amount of meta-information is quite or people use them with strings. However, it's an interesting area of optimization that I think will happen because document storage in Postgres has become something people are actually using now.
- amalag 15y agoHstore's query is only string matching, you cannot do the rich querying which mongodb allows.
- masklinn 15y agoNot sure what you're trying to say, but hstore's querying most definitely isn't "only string matching" no. hstore values, written in queries, use string-serialization for embedding in SQL. Which is very different. And this serialization is only needed when adding content to an hstore or performing set-operations on hstores, you can perform queries on hstore fields pretty much directly via the `->` operator: SELECT id FROM Table WHERE (hs->'size')::INT >= 42 AND (hs->'name') IS NOT NULL