在MongoDB中使用批量插入与常规插入相比的性能增益 [英] Performance gain by using bulk inserts vs regular inserts in MongoDB

查看:345
本文介绍了在MongoDB中使用批量插入与常规插入相比的性能增益的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MongoDB和pymongo中使用批量插入与常规插入的性能增益是什么。批量插入只是常规插入的包装器。

What is the performance gain by using bulk inserts vs regular inserts in MongoDB and pymongo specifically. Are bulk inserts just a wrapper for regular inserts?

推荐答案

批量插入不是普通插入的包装器。批量插入操作包含作为一个整体发送的许多文档。它节省了尽可能多的数据库往返。它性能更高,因为您不必通过网络单独发送每个文档。

Bulk inserts are no wrappers for regular inserts. A bulk insert operation contains many documents sent as a whole. It saves as many database round trips. It is much more performant since you don't have to send each document over the network separately.

这篇关于在MongoDB中使用批量插入与常规插入相比的性能增益的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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