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 A753910E11 for ; Sun, 10 Nov 2013 21:11:24 +0000 (UTC) Received: (qmail 75825 invoked by uid 500); 10 Nov 2013 21:11:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 75786 invoked by uid 500); 10 Nov 2013 21:11:23 -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 75778 invoked by uid 99); 10 Nov 2013 21:11:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Nov 2013 21:11:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mark.deibert@gmail.com designates 209.85.128.178 as permitted sender) Received: from [209.85.128.178] (HELO mail-ve0-f178.google.com) (209.85.128.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Nov 2013 21:11:17 +0000 Received: by mail-ve0-f178.google.com with SMTP id db12so2954013veb.9 for ; Sun, 10 Nov 2013 13:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=woBnwPSxrzNz8ypdPXZCAYqva1q/qaDZ+HjXEhlHi4U=; b=H3Ds14ko/XwxPAKYUtLIWzA+XmToT/VDNpc/svLRUOYiQTupk8AUL5unx1d8KNDO0m 3WWrVWZ7akzRdAeNni1CuBpK+qcD66rj2OxPQbChAykeCROtMG2CMWqI4/X/HVCkxF/K BVSjPp8XCaBOFsLsukrqGwwkm/1Wd8XrgT82a+zp2RVc+djChluqu/4e5UjWbTx+2ZLE FOYyzeU5VSkH0PBp4j2n2WMyZo14fey/DEEpb6qBf2HBr8ABD4IOXvrRK10kmsd5moSP 0oX832BEnhGWMwgZIOkVnEWSNnBBIlH5XPCo7BIhzxeX5tnusbEeM0Av/18Wm5VDi8IJ IwCw== MIME-Version: 1.0 X-Received: by 10.58.136.231 with SMTP id qd7mr20977016veb.1.1384117856560; Sun, 10 Nov 2013 13:10:56 -0800 (PST) Received: by 10.220.198.199 with HTTP; Sun, 10 Nov 2013 13:10:56 -0800 (PST) In-Reply-To: <1CD5C733-4854-407A-A8DF-8E29A1A0493B@couchbase.com> References: <527E548F.4020203@yandex.ru> <1CD5C733-4854-407A-A8DF-8E29A1A0493B@couchbase.com> Date: Sun, 10 Nov 2013 16:10:56 -0500 Message-ID: Subject: Re: Storage limitations? From: Mark Deibert To: "user@couchdb.apache.org" Content-Type: multipart/alternative; boundary=047d7b5d45d02af20f04ead90d5f X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d45d02af20f04ead90d5f Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Each comment is normally a very small amount of information, and id, userName, a date and a small text field. Probably no more than a short sentence on average. Why do I need to go through the trouble of creating new comment docs for each? This totally complicates the comment read code (there will 1000 reads to every 1 write, at least) both in the UI and the db for no reason. On Sun, Nov 10, 2013 at 1:34 PM, Jens Alfke wrote: > > On Nov 9, 2013, at 11:47 AM, Robert Newson rnewson@apache.org>> wrote: > > attachments are different to documents. They're stored as a series of > binary chunks and so they can be streamed in and out, you can go large > with attachments. > > But on the other hand, all attachments will get copied during a database > compaction, so they slow down the process and require more free disk spac= e. > If you have many gigabytes of attachments, you might consider storing the= m > externally and putting URL links in the documents. > > As for comments, just add new documents for each comment and use a > view (https://wiki.apache.org/couchdb/HTTP_view_API, > https://wiki.apache.org/couchdb/View_collation) to bring the article > and comment thread together. No need to update a document that way. > > Yup. The guide > has a > chapter-long example of a blog application that shows how to do comments > this way. > > =97Jens > --047d7b5d45d02af20f04ead90d5f--