Hacker News new | ask | show | jobs
by robert-zaremba 3908 days ago
At AgFlow (http://www.agflow.com), we've been using RethingDB for 2 years (since version 1.3 to 2.0). Eventually we migrated to PostgreSQL. The query language from RethinkDB is very powerful. But it's nothing compared to SQL when it goes to expressiveness and performance (at least on PostgreSQL). ReQL is deceptive. It performs well as long as you don't embed JavaScript or don't do sophisticated joins (even based on indexes). When doing more complicated queries it becomes very ugly and slow.

Our main motivations for migration was:

    * transactions
    * performance  
    * tool kits around SQL  
We are very happy after migration. Backup process is way faster. I think there is only one place where RethinkDB is better then PostgreSQL: replication + automatic failover. If your data is not in TB, then I wouldn't recommend Rethinkdb. World with relational DB, transactions, pl/sql, pub/sub, GiS, data constrains, stability... offered by PostgreSQL is way easier, reliable and offers better performance.
2 comments

> I think there is only one place where RethinkDB is better then PostgreSQL: replication + automatic failover.

I was about to ask. Are you guys running a single server deployment? Because, while I haven't used RethinkDB yet, it appeals to me precisely because PostgreSQL is an absolute pain to operate beyond single node setups. I've heard citusdb tries to tackle this, I don't know if they succeeded but still it doesn't look nearly as friendly as RethinkDB.

We don't need to shard our data, but we do multiple node setup for HA using Pgpool + streaming replication.

From what I heard sharding my be really problematic, and one should avoid it as much as possible.

I tried pg_shard a few months ago and after a few hours, I gave up. I somehow remember that partitioning MySQL was easier, and that's not a compliment.
Sumedh from Citus Data here. I'd love to hear what difficulties you ran into, or any feedback you may have on pg_shard. My email is in my profile if you want to drop me a note.

We are also actively working on making our products easier to use and would love to get more user input along that way.

It was mostly a lack of docs. Most of the documentation assumes citusDB, and how to get things work without citusDB is left out.
Yes, we moved to galera cluster. Even with its random node shutdowns, from my second-hand impressions it's still better than dealing with the pgpool, slony, et al.
Beyond replication and sharding, another key point of differentiation with RethinkDB is data sync/push.
PostgreSQL support that through triggers and Notify (www.postgresql.org/docs/9.4/static/sql-notify.html). You may look into chat example: https://gist.github.com/quiver/4240546