couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hirst <paul.hi...@sophos.com>
Subject Re: multiple database or many doc types in one database?
Date Thu, 17 Mar 2011 08:46:09 GMT
On Thu, 2011-03-17 at 04:51 +0000, Dominic Tarr wrote:
> is it a good idea to
>
>   1. separate documents for different types of thing into different
> databases?
>
> or is it better to
>
>   2. just have a type='whatever' and check for that in your views?

I am using option 2. I prepend type_ to my ids to avoid keys clashing
and also have a type field in the body which I use in my views.

However I'm really regretting doing it this way as I only have two
documents types. I have 0.25 million of type A and 28 million of type B.
I often want to change the views regarding type A documents and have to
wait about 12 hours for it to rebuild. If I had separate databases this
would be far less of a problem as the type A views would rebuild in a
few minutes.

If it wasn't such a large database I would be quite happy with option 2
so, as usual, the best choice depends on your situation.



Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 991 2418 08.

Mime
View raw message