couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: Views per design doucment
Date Tue, 01 Sep 2009 18:00:08 GMT
On Tue, Sep 1, 2009 at 10:14 AM, hadley wickham<h.wickham@gmail.com> wrote:
> So if only one application is using the database (at the moment), I'd
> have only one design document?  And do you mean application in the
> broad sense (i.e. any client of the database) or just couchdb
> applications?
>
> Hadley

There are two factors: performance and simplicity.

Generally you'll get better of both by having a small # of design docs. (eg: 1)

The exception to this rule is when you are developing a new view
against an existing large database that already has views. In this
case it can be a pain to lose the existing indexes just because you
want to add a new one. You can (A) work on a smaller development
database or (B) deploy the new view to it's own ddoc.

In production (when view definitions have stabilized) you'll likely
want to use a single ddoc, as it will generate faster and take less
space on disk.

Of course, these are extremes and maybe you'd want to have user views
in one ddoc and admin views in another... that sort of split can give
you more simplicity depending on your application.

Chris

>
> On Tue, Sep 1, 2009 at 12:07 PM, Zachary Zolton<zachary.zolton@gmail.com> wrote:
>> Basically, each application that uses a database should correspond to
>> a different design doc:
>>
>> http://books.couchdb.org/relax/design-documents/design-documents#Applications%20are%20Documents
>>
>> On Tue, Sep 1, 2009 at 11:35 AM, Hadley Wickham<hadley@rice.edu> wrote:
>>> Hi all,
>>>
>>> I'm confused about how I should split my views up between design
>>> documents.  I understand that the all the views in a design document
>>> are reindexed together, but this doesn't give me any feel for how I
>>> should split views up across design documents.  My feeling is to stick
>>> with one view per design document, unless there is some compelling
>>> reason otherwise (e.g. minor variations on the same theme).  Is this
>>> what other people do?  Any suggestions?
>>>
>>> Thanks,
>>>
>>> Hadley
>>>
>>> --
>>> http://had.co.nz/
>>>
>>
>
>
>
> --
> http://had.co.nz/
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message