Couch DB performance seems to suck We are looking for some nice solution to store persistently object-like data. Few weeks ago we had a look at Couch DB and performance looked horrible. We did not even bother to make some more realistic tests as initial data was just disqualifying.
We want to store objects with very dynamic schema and be able to index some of the properties. For example we want all objects of type book with title equal to X. We need it to be very fast. And when i mean very fast i mean memcache-kind of fast ;- )
So we thought maybe some database like couch db could help. We would store our objects and create some views to be able to list them. Plus couch db manual seems quite cool. I liked the idea that db is never shutting down, you just kill the process and db has to be consistent no matter what. Another cool feature was possibility to scale it between different servers.
We setup couchdb on debian with default setup and started inserting stuff and selecting by hash (only). We did not even do queries on views. On the machine we were working we had below 70 inserts/selects per second. So basically it was laughable.
We checked some config and thought maybe we do something wrong. We thought ok, lets see what happens if we do same thing on mysql. We created a few tables in mysql to have Inodb, Myisam, tables indexed with varchar(32) or with auto increment plus some text column. We created script that was inserting random data into in to see how fast would it work.
Then we just replaced the code inserting into couch db and selecting from couch db with code using mysql and we had 6000/s, 100 times faster!
I still cant believe its so slow. Maybe we did something wrong but we were not able to figure it out. So our conclusion was that couch db is really slow. At least for now its way to slow for our needs.
If you have any good insights what other tools would be worth looking at let me know ;- )
Comments
Couchdb Inserts are naturally
Couchdb Inserts are naturally going to be slower than mysql since one is going through http and the other is going through socket
Inserting bulk documents into couchdb should be done via bulk insert api rather than single doc inserts. With bulk insert, I get something like 2,000 docs/s vs 200 docs/s inserting one by one
Post new comment