Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 10070 invoked from network); 27 Sep 2010 15:31:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Sep 2010 15:31:56 -0000 Received: (qmail 80558 invoked by uid 500); 27 Sep 2010 15:31:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80385 invoked by uid 500); 27 Sep 2010 15:31:52 -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 80355 invoked by uid 99); 27 Sep 2010 15:31:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 15:31:52 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of djc.ochtman@gmail.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pw0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 15:31:46 +0000 Received: by pwi6 with SMTP id 6so1924999pwi.11 for ; Mon, 27 Sep 2010 08:31:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=OgN3N6VyinaTJ5SLJCoSJqa1ihpqYyUuhyoqhdauBFg=; b=mNIP9ICy8xeGnZxa0VvfGWYeEKhY4w8FnR7wW7EPNdb7rvsJF9RrPpdGvS83y6C8tw g2GSYu7B8In2GheP9hVhgR/O62yCt/9TQIZJk9NfsReHZYRTgvSpKLjcQvzhqcenoDxl UQSfIIi9a/fUFbbmF0RodiJJhZkYPXYvF4JBg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=sHbiXs2HHmtGdWgCNMLn+OmcZ560pNIYN8b1+5ENofSkl5SUl9SNJT4A/wLzqGaZ9W IXD62X5DXNn2e2ZxR/t7r5PIwBFHbGcvm23uKXQYJSXZGwvU7LrX75rxDgnX+7kCl/Ef Kb/QyM9XGVJUZFjGJpueO6Li3VHyhp74RgMH4= Received: by 10.143.2.11 with SMTP id e11mr6619275wfi.24.1285601486303; Mon, 27 Sep 2010 08:31:26 -0700 (PDT) MIME-Version: 1.0 Sender: djc.ochtman@gmail.com Received: by 10.142.49.2 with HTTP; Mon, 27 Sep 2010 08:31:05 -0700 (PDT) In-Reply-To: References: From: Dirkjan Ochtman Date: Mon, 27 Sep 2010 17:31:05 +0200 X-Google-Sender-Auth: 8Cvu1Bb7E9z6ju4p8GOfLoVdZrA Message-ID: Subject: Re: Pruning a couchdb database To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 On Mon, Sep 27, 2010 at 17:26, John Logsdon wrote: > I need to hold, potentially, millions of call records in a couchdb cluster > and using a management process periodically truncate the records based on > their age. I can see how I can get the Set of matching records using a View > but how do I delete them in the same operation? My understanding is that I > can only GET from a View so I cant see how to do this without bringing the > data back to the client and issuing a DELETE for each record which would be > a real problem wrt performance. Well, you don't need the fetch the data, but AFAIK you need to fetch the document ID's and do a bulk update with {"_id": "foo", "_deleted": true} for each document. Cheers, Dirkjan