Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 9634 invoked from network); 17 Jun 2010 20:37:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Jun 2010 20:37:59 -0000 Received: (qmail 15835 invoked by uid 500); 17 Jun 2010 20:37:58 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 15761 invoked by uid 500); 17 Jun 2010 20:37:57 -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 15753 invoked by uid 99); 17 Jun 2010 20:37:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jun 2010 20:37:57 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of faust451@gmail.com designates 74.125.78.25 as permitted sender) Received: from [74.125.78.25] (HELO ey-out-2122.google.com) (74.125.78.25) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jun 2010 20:37:51 +0000 Received: by ey-out-2122.google.com with SMTP id 22so39086eye.41 for ; Thu, 17 Jun 2010 13:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=fL4VEZGYqr/Jq5VX3lzsFEgEuEUbexu0xHnwF9VZPJQ=; b=qyokEhWTnsiKql+8tN2RkJ8z/+fZz5GvoV1qhxt4yOM40sseASZdJAf9vZ4Nf/4ZtJ 0qY1FlmG5baxkpPVgpIYNx7D5Pft3dPgFnGZNLknqD96l5Io4LvrkyofRrO4MhszU6XA gKDH0AklRmzo/+x9Zz8qe4i7I3soWMcjTKR1k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=rHyqrPfQ8YZq8y+xilXjmVvSjJv6HgUuzeLcIgx91G/xbOWAoQo6Pl4QkJX+4Gq2Np uqRRxlA43UJec1mFHg4CIMLC1h9EyZ5THEYA4dzuKDyA7IlcrU1A0zBWNY/j07jS2b7D N8j0n4Bo9I7MOljzVQQYTxvhAY4k8FtW6jmos= MIME-Version: 1.0 Received: by 10.213.32.197 with SMTP id e5mr18882ebd.41.1276807050003; Thu, 17 Jun 2010 13:37:30 -0700 (PDT) Received: by 10.213.32.139 with HTTP; Thu, 17 Jun 2010 13:37:29 -0700 (PDT) In-Reply-To: <46ACF4F3-1F6C-40F6-95C5-4B9286890BBA@gmail.com> References: <46ACF4F3-1F6C-40F6-95C5-4B9286890BBA@gmail.com> Date: Fri, 18 Jun 2010 00:37:29 +0400 Message-ID: Subject: Re: Need advice about docs structure design. From: faust 1111 To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org If i keep them in the same database What about view speed? Example users add many bookmarks and when try fetch Posts each bookmark processed by this view but it's unnecessary it's slow down my views is not it?. 2010/6/18 J Chris Anderson : > > On Jun 17, 2010, at 1:15 PM, faust 1111 wrote: > >> Hy guy's. >> >> My model: >> Users has >> =A0Bookmarks and Posts >> >> have idea keep Bookmarks and Posts in separate DB (for speed views). >> But in view i want fetch Bookmarks and Posts with user name, >> > > You should keep them in the same database (replication is easier, too) an= d then use this kind of query: > > http://www.cmlenz.net/archives/2007/10/couchdb-joins > >> In what way i can do this? >> keep copy of users in each DB? >> >> or may be keep users in separate DB, fetch bookmarks or posts and then >> fetch users and then merge? >> >> Yes i know i can copy user name to doc, but have a trouble when user >> name is changed (it's force me use stale=3Dok in request view >> +background process to track changes and run rebuild index). >> >> I think it's will be cool crazy stuff if i can update docs(cached >> fields - not have effect to index) and say Couch you don't need >> rebuild index relax ;). >> >> Any advice? > >