On Jun 29, 2010, at 11:01 AM, Behrad Zari wrote: >> 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? >
yes it's not any different, except for the runtime of the collation algorithm, which should not make much difference. Chris > I don't know about CouchDB implementation specifics such as determining block > size,... So I'd like CouchDB men can clarify these situations. > > --Behrad > >
