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 7EFCB1076D for ; Mon, 11 Nov 2013 15:00:48 +0000 (UTC) Received: (qmail 35113 invoked by uid 500); 11 Nov 2013 15:00:46 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 34769 invoked by uid 500); 11 Nov 2013 15:00:46 -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 34759 invoked by uid 99); 11 Nov 2013 15:00:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 15:00:45 +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.177 as permitted sender) Received: from [209.85.128.177] (HELO mail-ve0-f177.google.com) (209.85.128.177) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 15:00:39 +0000 Received: by mail-ve0-f177.google.com with SMTP id jz11so2178775veb.22 for ; Mon, 11 Nov 2013 07:00:18 -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=HuGenIMQdFLjUN8i5j1VF4QJMhMFhNDVkjR6GNPNSVE=; b=WEHMUJxz8pR4MkwG/gxuWVi9iRGlXs5r7akOTiUljCUGUiGwOuKt9srbDAxiZXZjKA DZ1C8d+P78G9KDavV6/dZB6ntVZa7t12z0uQcLWBXKeGAioqLrPEsz0iz4J19k8UiICp ep0fluL5X989Qo3tMsHrCMa0vwo6QbUCn8aBC7x3Sg4Us1Yn7h8kdU76jQyJiKgPq3mw Sszd4L3J1JKhrYRWCWq+UYEdOJLoNifW4kfY7/mssImw1ULINDphMkqfda6hHf+6t4Ub 9EANp4S0w0PfmubBc4D/RFoBod6WmtdIl37vYFGkhtV4cDeA9KRmJ1YRFyHQOkWMmqWL WdnQ== MIME-Version: 1.0 X-Received: by 10.221.6.195 with SMTP id ol3mr185870vcb.34.1384182018348; Mon, 11 Nov 2013 07:00:18 -0800 (PST) Received: by 10.220.198.199 with HTTP; Mon, 11 Nov 2013 07:00:18 -0800 (PST) In-Reply-To: References: <527E548F.4020203@yandex.ru> <1CD5C733-4854-407A-A8DF-8E29A1A0493B@couchbase.com> Date: Mon, 11 Nov 2013 10:00:18 -0500 Message-ID: Subject: Re: Storage limitations? From: Mark Deibert To: "user@couchdb.apache.org" Content-Type: multipart/alternative; boundary=089e013cbc8c82235004eae7fdff X-Virus-Checked: Checked by ClamAV on apache.org --089e013cbc8c82235004eae7fdff Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable @Simon: Thanks for the advice. As I type, I don't anticipate any aggregation on the Photo docs, but I should think about that some more. On Mon, Nov 11, 2013 at 9:56 AM, Simon Metson wrote: > Hey, > I=92d go with what you=92re doing (1:1 doc:photo). > > 2 seems a bit weird - do you mean host the app in a different server to > the data or have different databases for different types of data (that > might work, if you never want to query across types of data)? 3 might wor= k > so long as you never want to aggregate across the categories. 4 is a > reasonable approach for very very large attachments, but you can get into > consistency issues - what=92s the source of truth the database or the > filesystem? > Cheers > Simon > > > On Monday, 11 November 2013 at 14:41, Mark Deibert wrote: > > > A followup on the "1000's of images" question. I could approach this a > > couple ways. Currently each image is attached to it's own Photo doc. > Which > > I've read is better for replication than one attachment with many > > attachments. So that's fine, but will Couch have any issue managing > several > > thousand of these Photo docs, each with a 3MB'ish image attachment? If > you > > were building this Couchapp, would you... > > > > 1) Keep the photos as described above in one CouchDB > > 2) Move the Photo docs with attachments out into a separate CouchDB > > 3) Do 2, but break Photos into multiple categorized CouchDBs > > 4) Upload the images to the filesystem, just store the link in Couch > > > > I want to build this Couchapp in such a way as to not make life miserab= le > > for CouchDB :-D > > > > > > > > > > On Sun, Nov 10, 2013 at 6:33 PM, Dave Cottlehuber dch@jsonified.com)> wrote: > > > > > On 10 November 2013 23:14, Mark Deibert mark.deibert@gmail.com)> wrote: > > > > I read an article somewhere that using include_docs is "hard" on > memory > > > > > > > > > or > > > > disk or in some way taxes Couch and therefore you should just emit > the > > > > > > > > > doc. > > > > Is this true? > > > > > > > > > > > > Like most general statements it has some truth and some lies in it :-= ) > > > > > > views and docs are stored in separate .couch btree files on disk. > > > > > > emit(key, doc) puts a full copy of the doc (that's already in the doc > > > .couch b~tree) into the view b~tree. > > > > > > advantage - no need to hop over to the doc .couch file to retrieve th= e > > > document. > > > disadvantage - you now have 2 copies of the doc in separate files, > wasted > > > space. > > > > > > If you do things right, and your app fits this model, the generated > > > etags from views and docs can be cached in nginx or similar, and > > > repeated queries don't need to hit your couch. > > > > > > So yes, include_docs means extra reads, but like most of these things > > > you should benchmark your situation, under a realistic load, not just > > > pumping 1000 single-doc reads at it. > > > > > > A+ > > > Dave > > > > > > --089e013cbc8c82235004eae7fdff--