News for hackers. Stuff that matters.
Re:PostgreSQL Outperforms MongoDB in New Round of Tests by gozzoo on Saturday September 27, 2014 @05:14AM (#8376527)
> I've seen project that leveraged CouchDB to basically return all data for any given view with a single query from a pre-calculated view, something which would have impossible with an SQL database.

This sounds interesting. I've been looking for a good example where NoSQL db is better than relation db. Could you provide more details.

Re:PostgreSQL Outperforms MongoDB in New Round of Tests by lgas on Saturday September 27, 2014 @05:35AM (#8376560)
Postgresql has materialized views now:

http://www.postgresql.org/docs/9.3/static/sql-creatematerial...

Unless I'm misunderstanding what Xylakant means, that's certainly doable in Postgresql and has been in other relational databases for a long time.

Re:PostgreSQL Outperforms MongoDB in New Round of Tests by Xylakant on Saturday September 27, 2014 @06:47AM (#8376668)
I didn't mean "view" in the sense of "database view" but rather in the sense of "page view". All data displayed on a page with multiple types of documents was returned in a single query. That's certainly doable in pg, but requires a lot of hacks and it's not efficient. Or you can use hstore and basically use pg as a nosql db.
Re:PostgreSQL Outperforms MongoDB in New Round of Tests by lgas on Saturday September 27, 2014 @07:27AM (#8376721)
Ah, that makes sense, though couldn't you solve this by something like creating a table called 'pages' and storing the materialized JSON (the same that mongo would generate) in the table?
Re:PostgreSQL Outperforms MongoDB in New Round of Tests by Xylakant on Saturday September 27, 2014 @08:15AM (#8376814)
Sure, you could. But CouchDB just makes that very easy to do while it is very hard and hacky in PG. On the flip side, the use case did not require the guarantees that PG has to offer, so why go through the pain for no gain :)