couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiril Stankov <ki...@open-net.biz>
Subject Re: Why are temp views so much faster than design docs?
Date Wed, 11 Feb 2015 22:57:50 GMT
So, is it also true that if one removes a view from a ddoc, all views in 
this ddoc will be rebuilt?

10x.
------------------------------------------------------------------------
*Regards,*
Kiril Stankov

On 2/11/2015 12:18 PM, Alexander Shorin wrote:
> On Wed, Feb 11, 2015 at 12:43 PM, Kiril Stankov <kiril@open-net.biz> wrote:
>> Is there are problem to have all views in one doc, or one should spread them
>> across several docs - what are the guidelines here?
>> Does it affects how the btree is built?
>> Any impact on the Compact?
> There is no much problem for having a lot of views in single ddoc.
> Problems starts when you need to change one or add/remove some from
> ddoc. Then CouchDB will rebuild all the views in the ddoc, even those
> you didn't touch.
>
> As for btree, it allows to deduplicate map functions result. Say, you
> need to apply different reduce functions onto the same map function.
> You'll create two views with the same maps and different reduces. On
> disk, only one map result will be stored.
>
> On other hand, while having one-view-per-ddoc looks more flexible, it
> will cause CouchDB to use more file descriptors, less effective
> operate with file system cache.
>
> Guidelines? It depends. Personally, I prefer to group views/design
> functions by target document type or group of documents which they
> operates with.
>
> Here few more link on wiki about:
> https://wiki.apache.org/couchdb/Why%20are%20all%20Views%20in%20a%20single%20Index
> https://wiki.apache.org/couchdb/How_to_deploy_view_changes_in_a_live_environment
>
> --
> ,,,^..^,,,


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message