Hi,
I am having question related to storing millions/billions of document in Couch
DB and use view to get required documents. I would like to know about
performance/scalability of views/ Couch DB in following case.
I have application where I need to store meta data of millions/billions of
images for search purpose. Images will be added/updated/deleted/retrieve on
regular basis [10000/20000 per day].
we are thinking to store these documents in following format
e.g.
{
"_id": "201700000000002", /* this will be generated by our application*/
"_rev": "1-b85e805bdd293a5f727517beea9512b3",
"12398712397129": {"bCurrent": true, "bCanView": true} /*"12398712397129" is
image file name*/
"98127397192319": {"bCurrent": false, "bCanView": false}} /*"98127397192319"
is image file name*/
}
{
"_id": "201700000000003", /* this will be generated by our application*/
"_rev": "1-b85e83432d293a5f727517beea9512b3",
"89723979823929": {"bCurrent": true, "bCanView": true} /*"12398712397129" is
image file name*/
"92347324667324": {"bCurrent": false, "bCanView": false}} /*"98127397192319"
is image file name*/
"72832532467217": {"bCurrent": true, "bCanView": false}} /*"72832532467217"
is image file name*/
}
so if user want to get current image for record 201700000000002 we will be
having following view
function(doc) {
for(var prop in doc){
if(prop!="_id" && prop!="_rev"){
if(doc[prop].bCurrent!==undefined && doc[prop].bCurrent){
emit(doc._id, { RecordID: doc._id,ImageID: prop,bCurrent:
doc[prop].bCurrent, doc[prop].bCanView});
}
}
}
which will be called with key "201700000000002".
but as mentioned earlier Images will be added/updated/deleted/retrieve on
regular basis [10000/20000 per day] how this going to affect views performance?
Regards,
Ajay.