MongoDB与CouchDB(速度优化) [英] MongoDB vs CouchDB (Speed optimization)

查看:55
本文介绍了MongoDB与CouchDB(速度优化)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进行了一些速度测试,以比较MongoDB和CouchDB.测试时只有插入物.我得到的MongoDB比CouchDB快15倍.我知道这是因为套接字vs http.但是,对我来说很有趣,如何在CouchDB中优化插入?

I made some tests of speed to compare MongoDB and CouchDB. Only inserts were while testing. I got MongoDB 15x faster than CouchDB. I know that it is because of sockets vs http. But, it is very interesting for me how can I optimize inserts in CouchDB?

测试平台:Windows XP SP3 32位. 我使用了最新版本的MongoDB,MongoDB C#驱动程序和最新版本的Windows版CouchDB 安装包.

Test platform: Windows XP SP3 32 bit. I used last versions of MongoDB, MongoDB C# Driver and last version of installation package of CouchDB for Windows.

谢谢!

推荐答案

为了将大量数据批量插入数据库,CouchDB支持批量插入,Wiki中的 HTTP批量文档API .

For inserting lots of data into the DB in bulk fashion, CouchDB supports bulk inserts which are described in the wiki under HTTP Bulk Document API.

此外,请检出delayed_commits配置选项和上面链接中所述的batch=ok选项.这些选项通过与磁盘进行定期同步来启用类似的内存缓存行为.

Additionally, check out the delayed_commits configuration option, and the batch=ok option described in the above link. Those options enable similar memory-caching behavior with periodic syncing against he disk.

这篇关于MongoDB与CouchDB(速度优化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆