Chinaunix

标题: MongoDB客户端的选择 [打印本页]

作者: 三里屯摇滚    时间: 2012-02-23 18:54
标题: MongoDB客户端的选择
MongoDB客户端的选择[/align]





在MongoDB用户的Google Group上一位用户发布了其对目前几个主流MongoDB客户端的测试数据.原文如下:
  1. Hi there,
  2. I made the following trival benchmark:
  3. 100.000 insertions of a dict like
  4. d = {
  5. ‘name’ : ‘Andreas Jung’,
  6. ’street’ : ‘xxxxxxxxxxxxx’,
  7. ‘city’ : ‘yyyyyyyyyy’,
  8. ‘zip’ : 72070,
  9. }

  10. into MongoDB.
  11. Average insertion time on my Linux box
  12. Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
  13. pymongo: 9-10 seconds
  14. Ming: 40-42 seconds
  15. Mongokit: 80 seconds
  16. Using MongoDB 1.4.1
复制代码
可以看出pymongo在性能上远远胜出, 这一帖子甚至在后来引出了Mongokit的作者,作者在得到楼主的测试脚本后分析了Mongokit慢的原因,对Mongokit作出了改进..

这是一个开放的世界.

作者: 冰释一片天    时间: 2012-02-24 17:07
谢谢分享




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2