> On 30 Nov 2016, at 00:06, Alan Kash <[email protected]> wrote: > > Yes, from the link it mentions about stale views. > > Will be interested to know the merits of db pool vs view pool first model. > Logically, the queries are coming from top, and the view updates are > propagated bottom up.
The internal data structure benefits from bulk inserts vs single inserts. I.e. it takes (accumulated) less CPU, RAM, Disk, to update the view index with 10 docs in one bulk operation instead of 10 individual operations. > On a similar note, do the view updates leverage > parallel processing in multicore systems. In CouchDB 1.x: no, this is single threaded, albeit spread over two operating system processes, but using a blocking protocol, so together, they wouldn’t exhaust a single CPU. In CouchDB 2.x, if you set up multiple shards per cluster node, you basically get a CPU per shard for view computation, effectively using multicore systems optimally. Best Jan -- > > > > On Tue, Nov 29, 2016 at 5:49 PM, Robert Keizer <[email protected]> wrote: > >> After a document is added. >> >> My understanding is that the insertion to the main document pool happens >> at the start, with views being triggered to update after the document >> exists in that index. >> >> Someone with more experience may correct me - but I'm fairly certain >> this is why views can be stale ( >> http://docs.couchdb.org/en/2.0.0/api/ddoc/views.html ) >> >> >> On 2016-11-29 4:47 PM, Alan Kash wrote: >>> Hello, >>> >>> CouchDB starter here. >>> >>> How are the MapReduce views updated ? Before or after a new document is >>> added into store ? >>> >>> Do all document insertions go through some view process pipeline, then >>> finally to base document pool ? I am thinking in document stream >>> processing terms, where document ingress hits the *views processes* first >>> before finally ending up in the pool. >>> >>> Thanks >>> >> >> >> -- Professional Support for Apache CouchDB: https://neighbourhood.ie/couchdb-support/
