TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Hstore development for 9.4 release

310 pointsby andreypoppover 11 years ago

18 comments

twicover 11 years ago
This is wonderful work, and it is the foundation for yet more wonderful work in the future. However, as much as i am a huge PostgreSQL fanboy and a dedicated MongoDB peanut-thrower, i worry that the caption applied to this post is misleading.<p>Once this work is released, PostgreSQL will be faster than current versions of MongoDB at carrying out queries for documents which look for a given value at a given path (or perhaps more generally, values satisfying a given predicate at paths satisfying a given predicate).<p>But that has never been one of MongoDB&#x27;s important strengths, has it? The operations for which MongoDB is optimised are inserting documents, retrieving document by ID, and conducting map-reduces across the whole database. Yes, it has the ability to query by values in leaves, and it can use indices to make that faster, but that&#x27;s a bit of a second-tier, bag-on-the-side feature, isn&#x27;t it? If that was the main thing you needed to do, you wouldn&#x27;t have chosen MongoDB, right?
评论 #6690049 未加载
评论 #6692616 未加载
评论 #6693004 未加载
评论 #6690845 未加载
评论 #6690506 未加载
andreypoppover 11 years ago
This is impressive but not really surprising given the quality of PostgreSQL database. Quote:<p>&quot;We added performance comparison with MongoDB. MongoDB is very slow on loading data (slide 59) - 8 minutes vs 76s, seqscan speed is the same - about 1s, index scan is very fast - 1ms vs 17 ms with GIN fast-scan patch. But we managed to create new opclass (slides 61-62) for hstore using hashing of full-paths concatenated with values and got 0.6ms, which is faster than mongodb !&quot;
评论 #6689896 未加载
jeffdavisover 11 years ago
Great work and research; horrible submission headline.<p>The news here is that, in addition to the huge market for traditional DBs, postgres is going to compete in a serious way on MongoDB&#x27;s home turf. As that becomes more apparent, it will validate postgres&#x27;s flexability&#x2F;adaptability and cast doubt over special-purpose database systems and NoSQL.<p>MongoDB still has a story around clustering, of course. But that story is somewhat mixed (as all DB clustering stories are); and postgres is not standing still on that front, either.<p>(Disclaimer: I&#x27;m a member of the postgres community.)
评论 #6690881 未加载
评论 #6693027 未加载
integratonover 11 years ago
See also the PostgreSQL as a Schemaless Database slides (includes several benchmarks vs MongoDB): <a href="http://thebuild.com/presentations/pg-as-nosql-pgday-fosdem-2013.pdf" rel="nofollow">http:&#x2F;&#x2F;thebuild.com&#x2F;presentations&#x2F;pg-as-nosql-pgday-fosdem-2...</a>
gibyboover 11 years ago
Can I index fields within a JSON document in PostreSQL? Can I query them?<p>I.e. can I do something like SELECT json_field FROM data WHERE json_field.age &gt; 15 ?
评论 #6689976 未加载
评论 #6689914 未加载
评论 #6689923 未加载
评论 #6690660 未加载
评论 #6689926 未加载
desireco42over 11 years ago
Which is not surprising, as this is &#x27;real&#x27; database. I read review of MongoDB internals and it sounded not very positive. While you can create NoSQL quickly, to do it well with any db, it takes time which PostgreSQL definitely has.<p>Just to be clear, MongoDB is fine db for certain scenarios and I am using it in production.
评论 #6689961 未加载
craigkerstiensover 11 years ago
If you want to find more of the detail and background around this which came from a talk by the author of the blog post then you check out his slides at <a href="http://www.sai.msu.su/~megera/postgres/talks/hstore-dublin-2013.pdf?utm_source=postgresweekly&amp;utm_medium=email" rel="nofollow">http:&#x2F;&#x2F;www.sai.msu.su&#x2F;~megera&#x2F;postgres&#x2F;talks&#x2F;hstore-dublin-2...</a>. One of the key things not in the blog post but addressed in the slides is that there will be a new index type that really pushes the performance gains even further.
teteover 11 years ago
We actually use both of them in our system.<p>I really wish PostgreSQL wasn&#x27;t such an enormous challenge to scale horizontally.
评论 #6689939 未加载
eksithover 11 years ago
Implementing our doc store on Postgres a while ago in lieu of switching to MongoDB suddenly seems like a very good call.<p>We had nothing against Mongo (frankly haven&#x27;t gone into deep analysis of how it would turn out). It was simply the db we already had at hand and we knew it well and trusted it.
gosukiwiover 11 years ago
Postgres is quite scary, I feel that if I use it I&#x27;ll miss 90% of the features @_@
评论 #6690327 未加载
评论 #6690567 未加载
评论 #6690944 未加载
pstuartover 11 years ago
According to the roadmap page, 9.4 is due out in the 3rd quarter of 2014.
roncohenover 11 years ago
Fantastic!<p>No mention of arrays in the post, but in the slides: you can use {1, 2} syntax for arrays and hstore now eats it \o&#x2F;
andrewcookeover 11 years ago
context: <a href="http://www.postgresql.org/docs/9.1/static/textsearch-indexes.html" rel="nofollow">http:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;9.1&#x2F;static&#x2F;textsearch-indexes...</a> (GIN and GiST are index types)
willvarfarover 11 years ago
It would be great if they could run these benchmarks with mongodb using TokuMX.<p>I think tokutek&#x27;s fractal trees would make an exciting data store for postgresql, but benchmarks are difficult to find... Who is perceived to be faster these days generally? Mysql+innodb, mysql+tokudb or postgresql?
lucisferreover 11 years ago
Now if I could only get Mongoid to work with Postgres instead of Mongo I would be happy.
andylover 11 years ago
Postgres Array&#x2F;Hstore&#x2F;JSON datatypes have made my Rails apps way simpler. Great combination.
评论 #6690486 未加载
评论 #6690408 未加载
评论 #6691237 未加载
joshguthrieover 11 years ago
<p><pre><code> $ brew remove mongodb </code></pre> Okay guys, now we&#x27;re talking!
dkhenryover 11 years ago
So a database developer is saying that his database is faster then a competitors database. Shocking.....