开发者

Bulk Insert (like import) bson encoded data in mongodb

I am new to mongodb and thinking of trying this out in PHP5. If someone has any info or has done this please help. Basically I have a an object (or array of arrays) in PHP that I bson_encode. I am not sure how mongo db works but it seems to support batch insert. So I was wondering how would I like [LOAD DATA...] in mongodb using the bson_encoded collection of documents. thank you

Update: ok seems like batch insert only allows array (or any insert) Maybe I misunderstood that mongodb can query in bson (including inserts). so this i开发者_JAVA技巧s what I am trying now. bson_decode and batchInsert.


Any reason you're not using the batch insert built into the PHP driver?

http://us3.php.net/manual/en/mongocollection.batchinsert.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜