Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A83B105E7 for ; Fri, 16 Aug 2013 19:24:52 +0000 (UTC) Received: (qmail 813 invoked by uid 500); 16 Aug 2013 19:24:51 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 99620 invoked by uid 500); 16 Aug 2013 19:24:46 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 99599 invoked by uid 99); 16 Aug 2013 19:24:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 19:24:44 +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 (athena.apache.org: domain of jason.h.smith@gmail.com designates 209.85.219.42 as permitted sender) Received: from [209.85.219.42] (HELO mail-oa0-f42.google.com) (209.85.219.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 19:24:39 +0000 Received: by mail-oa0-f42.google.com with SMTP id i18so2727008oag.15 for ; Fri, 16 Aug 2013 12:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=DG2y0c5mgtkaZT4P4UMvU//NOJN9xwQWALlzNA/E/KY=; b=fkMGGnHCCRoWUaWoUd0++1ii7Ank8/UOEGxJZF8uPqpQZtORY/CYqY5tOwj6S44VXi lJgO4VKeLhQKbuIyM2/GZxEBqCapO91weyb6ug63OcdYH+EP/X8Dg2pik34E03oSGY3L 3E7ibLNxm266f+RLjP6vJc4l4hSEo2by0CMsBPsOvExrCshqFm01uEOxlbi/Xr+pZ/Vt oT0zgO+GKOQxdQUf1fe43uFw8jVWMFTbEH2H6t20jCyF818yHJ8yMsD7EHhHpvpykle3 Knf7svheLp0lao8e0tboo/EVHsDZWOk3UAwmkxHpN41HgdlJ8zb3w538V5RLTIFDPg9X QfBQ== X-Received: by 10.60.52.244 with SMTP id w20mr2592772oeo.30.1376681058547; Fri, 16 Aug 2013 12:24:18 -0700 (PDT) MIME-Version: 1.0 Sender: jason.h.smith@gmail.com Received: by 10.182.103.133 with HTTP; Fri, 16 Aug 2013 12:23:58 -0700 (PDT) In-Reply-To: <520DF58D.6040308@gmail.com> References: <57E7BFC7-8B8E-4014-8569-B03F99B73E35@apache.org> <520DEB55.8090203@gmail.com> <520DF58D.6040308@gmail.com> From: Jason Smith Date: Sat, 17 Aug 2013 02:23:58 +0700 X-Google-Sender-Auth: EFTjw6HHul3ni9oe0qbXvGEqqk4 Message-ID: Subject: Re: Erlang vs JavaScript To: "dev@couchdb.apache.org" Cc: Alexander Shorin Content-Type: multipart/alternative; boundary=001a1133460076bdd004e415894d X-Virus-Checked: Checked by ClamAV on apache.org --001a1133460076bdd004e415894d Content-Type: text/plain; charset=UTF-8 On Fri, Aug 16, 2013 at 4:49 PM, Volker Mische wrote: > On 08/16/2013 11:32 AM, Alexander Shorin wrote: > > On Fri, Aug 16, 2013 at 1:12 PM, Benoit Chesneau > wrote: > >> I agree, (modulo the fact that I would replace a string by a binary ;) > but > >> that would be only possible if we extract the metadata (_id, _rev) from > the > >> JSON so couchdb wouldn't have to decode the JSON to get them. Streaming > >> json would also allows that but since there is no guaranty in the > >> properties order of a JSON it would be less efficient. > > > > What if we split document metadata from document itself? > I would like to hear a goal for this effort? What is the definition of success and failure? Jan makes a fine point on user@. I "live with the pain." But really, life is pain. Deny it if you must. Until we are delivered--finally!--our sweet release, we will necessarily endure pain. Facts: * When you store a record, a machine must write that to storage * If you have an index, a machine must update the index to storage Building an index requires visiting every document. One way or another, the entire .couch file is coming off the disk and going through the ringer. One way or another, every row in the view will be written. I am not clear why optimizing from N ms/doc to 1/2 N ms/doc will help, when you still have to read 30GB from storage, and write 30GB back. One one end the computer scientist says we cannot avoid the necessary time complexity. On the other end, the casual user says, if it is not instantaneous, then it hardly matters. That is, we have a problem of expectation management, not codec speed. Nobody expects MySQL's CREATE INDEX to finish in a flash, and nobody should expect that of a view. If somebody does set out to accelerate views, you're welcome. But I would ask: what is a successful optimization, and why? (Also, Noah, if you are out there, this is an example of the sort of thing I would put on the wiki but past bad experiences make me say "can't be bothered.") --001a1133460076bdd004e415894d--