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 A55BC78CC for ; Sat, 8 Oct 2011 04:40:27 +0000 (UTC) Received: (qmail 48507 invoked by uid 500); 8 Oct 2011 04:40:25 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 48466 invoked by uid 500); 8 Oct 2011 04:40:25 -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 48458 invoked by uid 99); 8 Oct 2011 04:40:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Oct 2011 04:40:25 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jens@couchbase.com designates 206.225.164.31 as permitted sender) Received: from [206.225.164.31] (HELO EXHUB020-4.exch020.serverdata.net) (206.225.164.31) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Oct 2011 04:40:17 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.169]) by EXHUB020-4.exch020.serverdata.net ([206.225.164.31]) with mapi; Fri, 7 Oct 2011 21:39:54 -0700 From: Jens Alfke To: "user@couchdb.apache.org" Date: Fri, 7 Oct 2011 21:39:54 -0700 Subject: Re: How does the B-tree for view indexes behave? Thread-Topic: How does the B-tree for view indexes behave? Thread-Index: AcyFdFMXRoOwwwxpRFawZNR1EEpf+Q== Message-ID: <3D3886FD-9E2C-484B-92B4-DB72CC78EB2C@couchbase.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_3D3886FD9E2C484B92B4DB72CC78EB2Ccouchbasecom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_3D3886FD9E2C484B92B4DB72CC78EB2Ccouchbasecom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable On Oct 7, 2011, at 6:59 PM, Pulkit Singhal wrote: 1) Does CouchDB mark existing rows in a view index as "invalid" for ALL of the following operations: add,delete, edit? Yes. 2) For deletes: Is the info not added at the end of the B-tree for the view index? I=92m not sure what you mean by =93at the end=94. See below. 3) Does CouchDB break out of its "append-only-model" if a document gets updated for a view index? Are the resulting new lines really inserted into the B-tree? Why the change in behavior? You=92re mixing up two layers of abstraction: the b-tree itself, where we c= an talk about operations like =93insertion=94 and =93deletion=94; and the f= ile format, which is strictly append-only. So yes, changes do get inserted into or deleted from the b-tree. But at the= file level, those operations are implemented only through appending to the= file. =97Jens --_000_3D3886FD9E2C484B92B4DB72CC78EB2Ccouchbasecom_--