I have to insert 10 million documents in CouchDB localhost. I have used a python script to create random data in this format:
{
"docs": [
{"_id": "0", "integer": 0, "string": "0"},
{"_id": "1", "integer": 1, "string": "1"},
{"_id": "2", "integer": 2, "string": "2"}
]
}
The size of the file is 1.5 GB as I have 10 key-value pairs in each document.
I am using this command to load the json file:
curl -d @db.json -H "Content-type: application/json" -X POST http://127.0.0.1:5984/new/_bulk_docs
For 100,000 documents it tool 10-15 seconds to load, but for 10,000,000 it didn't even load in 12 hours.
Any help on how can I bulk insert in couchDB will be appreciated.
TIA