You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Ian Cox <ia...@releasemobile.com> on 2012/07/20 12:13:09 UTC

checkpointing view update at seq

Hi everyone,

My database has an update_seq of 173976. Not that big really.

I am adding a fairly small document to the database and a new view
that only looks at that document but I see in the log checkpointing
view update for every document in the database. Is this because it has
to check every document to see if it applies to the new view? And does
this mean that as the database gets bigger then any new view will take
longer and longer to generate? Is there a way to speed this up, or
tell it somehow to ignore the other documents when building this view?

Best Regards
Ian

Re: checkpointing view update at seq

Posted by Nils Breunese <N....@vpro.nl>.
Simon Metson wrote:

> If you need to pre-build the view, before putting it into production, you can build the index with the design document named something like '_design/myapp_deploy' then, once complete, upload the design doc to '_design/myapp' - this should then use the prebuilt index.

More on that here: http://wiki.apache.org/couchdb/How_to_deploy_view_changes_in_a_live_environment

Nils.
------------------------------------------------------------------------
 VPRO   www.vpro.nl
------------------------------------------------------------------------

Re: checkpointing view update at seq

Posted by Simon Metson <si...@cloudant.com>.
Hi Ian, 
If you only want the view to apply to a single document (and will always only want it to apply to that doc) you should probably use a show function instead - that lets you modify the document server side.

A view build will index all documents that have been modified since the last build. If it's a new view that means all the documents in the database. Once the index is completed it should just process delta's. 

If you need to pre-build the view, before putting it into production, you can build the index with the design document named something like '_design/myapp_deploy' then, once complete, upload the design doc to '_design/myapp' - this should then use the prebuilt index.

Hope that helps
Simon


On Friday, 20 July 2012 at 11:13, Ian Cox wrote:

> Hi everyone,
> 
> My database has an update_seq of 173976. Not that big really.
> 
> I am adding a fairly small document to the database and a new view
> that only looks at that document but I see in the log checkpointing
> view update for every document in the database. Is this because it has
> to check every document to see if it applies to the new view? And does
> this mean that as the database gets bigger then any new view will take
> longer and longer to generate? Is there a way to speed this up, or
> tell it somehow to ignore the other documents when building this view?
> 
> Best Regards
> Ian
> 
>