Hi, The smaller unit will save you lots of trouble, esp. when updating the code of large views
Cheers Sebastian Von meinem iPhone gesendet > Am 22.07.2014 um 19:02 schrieb Tito Ciuro <tci...@mac.com>: > > Is it better then to define a view per design doc then? If I have say, 8 > views for a given person design doc, would you place them in one single doc > or break them into smaller units? > > -- Tito > > >> On Jul 22, 2014, at 9:45, Mike Marino <mmar...@gmail.com> wrote: >> >> Multiple views also allows you to split them across design documents, which >> means they can be built independently and in parallel. >> >> >>> On Tue, Jul 22, 2014 at 5:44 PM, Jens Alfke <j...@couchbase.com> wrote: >>> >>> >>> On Jul 22, 2014, at 2:51 AM, Landry Soules <landry.soules...@gmail.com> >>> wrote: >>> >>>> My question is : is it more efficient to create a single view containing >>>> several emit, for example: >>>> emit([doc.age, doc.gender, doc.lastSeen], doc); >>>> emit([doc.gender, doc.age, doc.lastSeen], doc); >>>> or to create several views, each of them containing one emit statement ? >>> >>> Creating several views is probably better, since each one will be slightly >>> faster to search. Also, with one view you can easily get mixed up between >>> different types of keys — for example, if you emit both doc.gender and >>> doc.name as keys, and both are strings, then the “F” gender rows are >>> going to appear in between the names that start with “E” and “F”, which >>> sounds like a mess. >>> >>> —Jens