标签: php mongodb
我尝试使用大数据填充我的mongodb集合以测试性能。我首先尝试在这样的循环中进行:
mongodb
while($i <= 1000000){ $collection->insert($_POST); }
然后我尝试了这种方式:
$collection->insert($_POST); $collection->insert($_POST); ... $collection->insert($_POST);
但在这两种情况下只添加了一行。那是为什么?