incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Copenhaver <sean.copenha...@gmail.com>
Subject Re: Bulk updates with an _update handler?
Date Tue, 17 May 2011 21:32:49 GMT
Can couch batch the _updates the same as it can for individual docs?

http://guide.couchdb.org/draft/performance.html#batch

Alternatively you could setup a view to retrieve all the documents in
question, run your _update logic on the client, then _bulk_docs the results.

Views I thought were already batch updated sort of like how batch mode
handles writes. Regardless _bulk_docs would increase throughput.

On Tue, May 17, 2011 at 5:22 PM, Joe Freeman <joe.freeman@bitroot.com>wrote:

> On 17 May 2011 21:12, Paul Davis <paul.joseph.davis@gmail.com> wrote:
> > Fairly straight forward I suppose. Bigger question is whether its a good
> idea.
>
> Why wouldn't it be a good idea?
>
> Here's the problem I face:
>
> The application I'm working on can potentially do lots of sequential
> updates to separate documents (using requests to an _update handler).
> When this happens there seems to be a big spike in the load on the
> server. I'm presuming this is because the views get regenerated after
> each of the updates (possibly because I'm using a _changes feed, and
> re-requesting the view on each change).
>
> I was under the impression this would be much more efficient if the
> updates were being batched (so the view would only get regenerated
> once after all the updates have been made?). Maybe I'm
> misunderstanding the point of bulk updates, or just how views get
> updated?
>



-- 
“The limits of language are the limits of one's world. “ -Ludwig von
Wittgenstein

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