couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Cox <ian....@releasemobile.com>
Subject checkpointing view update at seq
Date Mon, 23 Jul 2012 08:54:19 GMT
Thanks for the tips about deploying view changes to production, that
will come in  useful.

With regard to using show functions instead of views, I don't think
that won't work in my case because actually there are several related
documents in the view in question (I probably wasn't specific enough
in my email). We have a master document and a set of sub documents and
the view applies across the set of sub documents but there is on view
for each master document.

Cheers
Ian

> 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
>
>
> 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
>>
>>
>
>
>
> 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
> ------------------------------------------------------------------------
>
>

Mime
View raw message