couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Behrad Zari <>
Subject Re: View Efficency
Date Tue, 29 Jun 2010 18:01:40 GMT
> However, I think the original question from
> Behrad still stands, is it more efficient to emit multiple keys per
> document, or create multiple views?

My own analysis was: when emting multiple keys per document, we have more index 
keys, i.e. a bigger tree. Call it M*N indexes where M is number of emits per 
document and N is number of docs emitted! Since querying a B+ tree is logaritmic 
to the number of indexes, we MAY compare Log(N) with Log(M*N) with base of tree 
block sizes! and Since M is not that big in real applications, I don't think 
emiting multiple keys per doc will give much more poor performance in quering 
the view in comparision to one emit per document. Take that In the later 
scenario we may want to call multiple views and merge the results!

Another unclarified thing for me is the situation where we emit array keys (i.e. 
[key1, key2,...] ). I don't know about how that affects query time. Is the couch 
behavior like single value keys?

I don't know about CouchDB implementation specifics such as determining block 
size,... So I'd like CouchDB men can clarify these situations.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message