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 94DA0B476 for ; Wed, 4 Jan 2012 23:18:08 +0000 (UTC) Received: (qmail 91519 invoked by uid 500); 4 Jan 2012 23:18:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 91494 invoked by uid 500); 4 Jan 2012 23:18: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 91486 invoked by uid 99); 4 Jan 2012 23:18:06 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2012 23:18:06 +0000 Received: from localhost (HELO mail-iy0-f180.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2012 23:18:06 +0000 Received: by iazz13 with SMTP id z13so38350765iaz.11 for ; Wed, 04 Jan 2012 15:18:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.160.201 with SMTP id xm9mr69399463igb.16.1325719085844; Wed, 04 Jan 2012 15:18:05 -0800 (PST) Received: by 10.42.243.67 with HTTP; Wed, 4 Jan 2012 15:18:05 -0800 (PST) In-Reply-To: <14457E59-A9FC-457B-BE11-EBC431E4D7C5@sri.com> References: <14457E59-A9FC-457B-BE11-EBC431E4D7C5@sri.com> Date: Wed, 4 Jan 2012 23:18:05 +0000 Message-ID: Subject: Re: View generation order. From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Martin, In answer to your actual question: No, it is not currently possible to ask couchdb to build view over just the most recent N documents/updates in a database. It's true that separating views into different design documents will allow parallel view building but note that too much parallelism is just as much as problem as too little. B. On 4 January 2012 23:07, Jim Klo wrote: > What we've done, which may not be ideal... but in our app, all view queri= es are stale (will be migrating to stale and update once we upgrade couchdb= ), but then have an external job that triggers the indexing by querying for= 1 element in a view in each design doc. =A0You could follow a similar appr= oach and prioritize which indexes start indexing first if you have resource= limitations, otherwise, I think indexing multiple design docs is concurren= t. > > > Jim Klo > Senior Software Engineer > Center for Software Engineering > SRI International > > > > > On Jan 4, 2012, at 2:50 PM, Martin Hewitt wrote: > >> Hi all, >> >> I was wondering if it's possible to set or influence where the view gene= ration process starts? >> >> We have a large DB which we let clients build views on. We then map thos= e views to JS map functions and create the relevant design doc. The only pr= oblem we have is that the database is huge and the view generations take a = while. This means the oldest data is processed first, which doesn't suit us= as, in the short term, the most useful values are those which are more rec= ent, i.e. the entries that were made a minute ago not a year ago. >> >> Any help gratefully appreciated. >> >> Martin >