Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 64297 invoked from network); 28 Oct 2009 19:41:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Oct 2009 19:41:07 -0000 Received: (qmail 58168 invoked by uid 500); 28 Oct 2009 19:41:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 58109 invoked by uid 500); 28 Oct 2009 19:41:06 -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 58099 invoked by uid 99); 28 Oct 2009 19:41:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 19:41:06 +0000 X-ASF-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.kocoloski@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 19:41:03 +0000 Received: by fg-out-1718.google.com with SMTP id 22so2002812fge.5 for ; Wed, 28 Oct 2009 12:40:42 -0700 (PDT) Received: by 10.87.73.33 with SMTP id a33mr505098fgl.26.1256758842399; Wed, 28 Oct 2009 12:40:42 -0700 (PDT) Received: from ?10.0.1.9? (c-66-31-20-188.hsd1.ma.comcast.net [66.31.20.188]) by mx.google.com with ESMTPS id 3sm3086296fge.29.2009.10.28.12.40.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Oct 2009 12:40:41 -0700 (PDT) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1076) Subject: Re: Best practice for view updates across large data sets From: Adam Kocoloski In-Reply-To: Date: Wed, 28 Oct 2009 15:40:38 -0400 Content-Transfer-Encoding: 7bit Message-Id: <7F79589C-7F30-4C47-A329-123252F8CA84@apache.org> References: <9ce8c9f70910271725x2a338fcdi45ce6d55bf58d545@mail.gmail.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1076) Hi Seggy, it's per design document. Every time you change any view in a design doc, all the views in that document are reindexed. Best, Adam On Oct 28, 2009, at 3:09 PM, Seggy Umboh wrote: > That's interesting. Is the hash per design document, or per view? > Does it > mean that when I change one view in my _design/development, only > that view > is reindexed? > > > On Tue, Oct 27, 2009 at 7:53 PM, Adam Kocoloski > wrote: > >> On Oct 27, 2009, at 8:25 PM, Larry wrote: >> >> As I had expected Im starting to experience lengthy re-indexing >> times when >>> changing/updating our views. We have just over 300K worth of >>> documents >>> currently and it will be growing. One of our views takes about 20 >>> minutes >>> or >>> so to index when installed. This locks up key aspects of our >>> application >>> and >>> we would like to find a way to keep the application continuously >>> functional. >>> I know that our views scripts can certainly be optimized and thats >>> something >>> were working on as our knowledge and experience with CouchDB grows. >>> However >>> given where we are now I was wondering if there is a "best >>> practice" or >>> any >>> tips that users may have on updating views across large data sets. >>> >>> Thanks for the help! >>> >>> larry >>> >> >> Hi Larry, one trick you may find useful in 0.10 is to take >> advantage of the >> fact that the view index files are identified by the hash of their >> contents. >> This means that you can have your _design/production document and >> your >> _design/development document, and when you're satisfied with the >> dev version >> of your app and you want to deploy it, you can just update >> _design/production to be identical to _design/development -- your >> production >> system will automatically use the prebuilt indexes from _design/ >> development >> with zero downtime. You can even use HTTP COPY to do this if you >> like. >> Cheers, >> >> Adam >> >>