From couchdb-user-return-599-apmail-incubator-couchdb-user-archive=incubator.apache.org@incubator.apache.org Sun Jun 29 04:19:13 2008 Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 21479 invoked from network); 29 Jun 2008 04:19:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jun 2008 04:19:13 -0000 Received: (qmail 51291 invoked by uid 500); 29 Jun 2008 04:19:14 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 51257 invoked by uid 500); 29 Jun 2008 04:19:13 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 51246 invoked by uid 99); 29 Jun 2008 04:19:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jun 2008 21:19:13 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dking@ketralnis.com designates 68.183.67.83 as permitted sender) Received: from [68.183.67.83] (HELO ketralnis.com) (68.183.67.83) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jun 2008 04:18:23 +0000 Received: from [10.0.0.234] ([10.0.0.234]) (authenticated bits=0) by ketralnis.com (8.14.2/8.14.2) with ESMTP id m5T4HRgx023160 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sat, 28 Jun 2008 21:17:27 -0700 (PDT) (envelope-from dking@ketralnis.com) Message-Id: From: David King To: couchdb-user@incubator.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: General-understanding questions about views Date: Sat, 28 Jun 2008 21:17:23 -0700 References: <3F12B537-F1E1-45A5-857E-53E8CD5EC73E@ketralnis.com> <250C86A3-3F40-4C48-B05B-2ED9DCFF1109@apache.org> <8BC12E79-6DDE-499B-9C81-49C891C0B42E@ketralnis.com> X-Mailer: Apple Mail (2.924) X-Virus-Checked: Checked by ClamAV on apache.org >> How would that total be updated if something were deleted or >> updated? Does >> the sum() function have to be evaluated over doc.Amount of *every* >> doc on >> every update? > I don't grok the internals well enough to say exactly why, but I do > know that one of the main features of CouchDB is the fact that only > the changed documents (and a minimum of aggregation "re-reductions") > need to be recomputed when an already mapped doc is updated or > deleted. But in the example I gave (that I got from the CouchDB wiki), there's no way for the reduction to be accurate in the face of deletions and modifications without re-calculating it for every single item in the database. That is, given a database of 5 million rows, every time one is modified or deleted (or possibly even added, depending on implementation), all 5 million rows have to pass through that function Is there another way to handle modifications and deletions?