2009/9/23 Jan Lehnardt <[email protected]>: > > On 22 Sep 2009, at 18:39, Elf wrote: > >> 2009/9/22 Ning Tan <[email protected]>: >>> >>> On Tue, Sep 22, 2009 at 11:43 AM, Elf <[email protected]> wrote: >>>> >>>> Do not use emit(something, doc), prefer to use include_docs=true (so, >>>> emit(something, something_less_than_large_document) when requesting a >>>> view. >>> >>> Can you elaborate on this? What if I have a mostly read database (i.e. >>> I don't care too much about view update time and space limitation, >>> etc) and want to get to the data very quickly? Having to use >>> include_docs means internally I need to query a second b-tree to get >>> the data, right? >> >> So, I will recommend you to store documents in a view :-) >> But topicstarter is novice in couchdb, so I can't recommend that tactics >> for it. >> Also, I think, second b-tree lookup is not a bottleneck. Bottleneck >> may be disk or network bandwidth, so... It's need to test your >> environment, not to guessing. > > It'd be a secondary b-tree lookup per view result row. So this is a > significant hit > on view read time). Emitting the full doc is also a significant hit (on view > index > time). Emitting only the values you need from a view is best for both cases > :)
I agree with you. I forgot that documents lookup must be done several at one view request. > > Cheers > Jan > -- > > -- ---------------- Best regards Elf mailto:[email protected]
