Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 851419978 for ; Thu, 15 Mar 2012 08:48:58 +0000 (UTC) Received: (qmail 69587 invoked by uid 500); 15 Mar 2012 08:48:57 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 69544 invoked by uid 500); 15 Mar 2012 08:48:56 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 69528 invoked by uid 99); 15 Mar 2012 08:48:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 08:48:56 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [81.169.146.162] (HELO mo-p00-ob.rzone.de) (81.169.146.162) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 08:48:49 +0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1331801307; l=2059; s=domk; d=gonvaled.com; h=Content-Transfer-Encoding:Content-Type:To:Subject:Date:From: References:In-Reply-To:MIME-Version:X-RZG-CLASS-ID:X-RZG-AUTH; bh=AZllzrjLrzClLc1AkH9H7thkUhc=; b=vX4EHRCsjdhGZOhoIUKu4WaLs8Jlb845F5s2YNj1cxCnFarU4rTfZnNOtR1Xu7MRP04 g+5hH0a4VYlPMuU+lnry9qk5/K9PjnWagunKSlYTIDVncFm5PIucusL0JsrCfW6jSB1WE MVJKGGLPLqGWEFsKLSJ3kekj8t51LpZ707k= X-RZG-AUTH: :K2MKY0GkfvuAYI9OvLYEA55J0qvTZZULi9CTHjqnn8/d41Z9VA5z1TMajByBSJxL X-RZG-CLASS-ID: mo00 Received: from mail-gy0-f180.google.com ([209.85.160.180]) by smtp.strato.de (fruni mo49) (RZmta 28.1 AUTH) with ESMTPA id Y06533o2F8KKYh for ; Thu, 15 Mar 2012 09:48:27 +0100 (MET) Received: by ghbz12 with SMTP id z12so3439987ghb.11 for ; Thu, 15 Mar 2012 01:48:25 -0700 (PDT) Received: by 10.236.184.167 with SMTP id s27mr7342047yhm.8.1331801305137; Thu, 15 Mar 2012 01:48:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.9.11 with HTTP; Thu, 15 Mar 2012 01:48:05 -0700 (PDT) In-Reply-To: References: From: Daniel Gonzalez Date: Thu, 15 Mar 2012 09:48:05 +0100 Message-ID: Subject: Re: Creating a database with lots of documents and updating a view To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Cgs, I suppose I could come up with a partition strategy that distributes the load: I could do what you suggest, or I could also use separate hosts. But all this would transfer complexity to my application, and I want to avoid that. Thanks Daniel On Thu, Mar 15, 2012 at 12:41 AM, CGS wrote: > Hi, > > Sorry for interfering, Daniel, but do you really need all those documents > in a single database? I mean is it mandatory to have them there? Because = if > not, one can split that 3M database in 10 - 100 smaller databases, each > with its own view, and concatenate the result after that (if you cannot u= se > pagination, otherwise, instruct your view to take only a certain number o= f > results per displayed page) using JS or whatever else if you have an > application which needs that result. In this way you can have a certain > level of parallelism which may speed the overall process. > > Just a 2c idea. > > CGS > > > > > > On Thu, Mar 15, 2012 at 12:13 AM, Matthieu Rakotojaona < > matthieu.rakotojaona@gmail.com> wrote: > >> On Wed, Mar 14, 2012 at 10:19 PM, Christopher Sebastian >> wrote: >> > I am also new to couchdb, but I don't believe the information from >> Matthieu >> > Rakotojaona is correct. =A0It is my understanding that pretty much >> everything >> > in CouchDB (including views) uses incremental updates. =A0So adding ne= w >> > documents to the database does NOT cause all view leaves to be travers= ed >> -- >> > the view is updated incrementally. >> > >> > Is this correct? >> > >> > ~Christopher Sebastian >> >> I might have spoken a little bit too fast. Indeed when you add new >> documents, they are automatically passed (or rather they will be when >> the next query comes) to the map function, which doesn't traverse the >> already indexed db. >> >> But when (and if) you have a reduce function, all the intermediary >> rereduce results will have to be updated, right ? >> >> -- >> Matthieu RAKOTOJAONA >>