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 7A545405F for ; Fri, 17 Jun 2011 22:35:18 +0000 (UTC) Received: (qmail 95401 invoked by uid 500); 17 Jun 2011 22:35:16 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 95363 invoked by uid 500); 17 Jun 2011 22:35:16 -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 95355 invoked by uid 99); 17 Jun 2011 22:35:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 22:35:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ykhambia@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qy0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 22:35:12 +0000 Received: by qyk10 with SMTP id 10so554635qyk.11 for ; Fri, 17 Jun 2011 15:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=KPMmV76TsnXb5hx4lgJql5yUqd9GtK7Yrg5vfa85aOw=; b=h6qyQ8/36so3UoKZ+QzK+oIKfLD/ectzN4POXA9dWdGwSMHwI6Ofi/tzb0QSoCP7Q1 5gklYfQh/S7awy8UhGIn/R5jvWDc7/eWJbwsi1NmCTmwRWvXC/+9kIsKRdD8k1OLJvWe y60ODFHafFYpiir2yg4xtIBlLcKZ4I6IMXOIo= 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; b=v7ae4kSxRpCgMy7/9govZnM6v+oVHzT8Na0CP7SeazjGwfPIKljr5npQaoCfbyuadT OtMfHP1IVsgzrkub6FKN32+NRRwJLV8B0xo8teV986x6kI+YOqNzdU4227MM/uWLysdV Ub3MIgi/MrXQCGu2G+cS7Utx4zqG8luD8yjNo= MIME-Version: 1.0 Received: by 10.224.138.16 with SMTP id y16mr2215990qat.3.1308350090108; Fri, 17 Jun 2011 15:34:50 -0700 (PDT) Received: by 10.229.225.83 with HTTP; Fri, 17 Jun 2011 15:34:49 -0700 (PDT) In-Reply-To: References: Date: Sat, 18 Jun 2011 00:34:49 +0200 Message-ID: Subject: Re: view index generation for single document and bulk documents From: Yogesh Khambia To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0022152d80995ce03604a5effe15 --0022152d80995ce03604a5effe15 Content-Type: text/plain; charset=ISO-8859-1 Hi Marcello, Thanks for information. In fact the information about the data being updated to the last record is required, with the condition that end user should not have a notifiable waiting ime (not more than 20 sec). For testing, I did measurements with CouchDB-1.0.1 and CouchDB-1.1.0 for the clean installation database on Ubuntu machine(single core) with only CouchDB running on the machine. A writer from my another machine writes documents to the database. I observed a significant difference between the writing speed as follows: CouchDB-1.0.1 CouchDB-1.1.0 Writing speed 5 Docs/sec 20-25 docs/sec I am sticking with CouchDB-1.0.1 for my project now as I am using it for quite sometime and it is stable. For Windows it crashed (we know that Windows is not officially supported platform). so for now, I am not using 'stale=update_after'. On Thu, Jun 16, 2011 at 9:36 AM, Marcello Nuccio wrote: > 2011/6/16 Yogesh Khambia : > > Hi Marcello, > > > > Thanks for the tip. > > I will be testing with CouchDB-1.1 soon. > > One point I want to add: > > In my case as the database is being updated quite often, the user is > > interested in the view on the latest data available at any time. Querying > > the view with 'stale=update_after' parameter will result in stalling the > > view and then rebuilding the view index, therefore, it will not give the > > view on the latest data. > > It will give the view on the latest indexed data and it will ensure > that the index is kept updated. It's a trade-off. What is the most > important for your users: fast response time or information updated to > the last second? > > Marcello > > > > > On Thu, Jun 16, 2011 at 7:40 AM, Marcello Nuccio > > wrote: > > > >> Hi Yogesh, > >> I cannot answer your questions, but I think you should repeat your > >> tests with CouchDB-1.1 and querying the view with `stale=update_after` > >> parameter. > >> > >> Read > >> > http://docs.couchbase.org/couchdb-release-1.1/index.html#coudhdb-release-1.1-updateafter > >> for more information. > >> > >> Bye, > >> Marcello > >> > >> 2011/6/16 Yogesh Khambia : > >> > Hi all, > >> > > >> > Currently, I am doing performance tests with database in CouchDB > 1.0.1, > >> > where a script is continuously writing single documents to the CouchDB > >> > database. > >> > I had the issue of the user being penalized for reading the view in > >> CouchDB > >> > database, by updating the view indexes.To improve on the latency for > the > >> > view index generation, I wrote a function which generates the view > >> indexes > >> > for each new update made to the database. > >> > The latency for view index creation has been improved. However, I read > >> from > >> > the FAQ on the CouchDB wiki that "The reason not to integrate each doc > as > >> it > >> > comes in is that it is horribly inefficient and CouchDB is designed to > do > >> > view index updates very fast, so batching is a good idea." > >> > It will be really helpful if somebody can answer me on following: > >> > > >> > - If view index generation for each new single document insert is not > a > >> > good approach? > >> > > >> > - How does the single document insert and bulk document insert affect > the > >> > CouchDB view generation, where: > >> > > >> > 1. a daemon script updates view index for each new document insert. > >> > 2. a daemon script updates view index for bulk document > >> > > >> > Thank you. > >> > > >> > > >> > -- > >> > Best Regards, > >> > Yogesh Khambia > >> > Postgraduate Design Engineer > >> > Mobile: +31 626 217 381 > >> > Email: y.khambia@tue.nl > >> > > >> > > > > > > > > -- > > Best Regards, > > Yogesh Khambia > > Postgraduate Design Engineer > > Mobile: +31 626 217 381 > > Email: y.khambia@tue.nl > > > -- Best Regards, Yogesh Khambia Postgraduate Design Engineer Mobile: +31 626 217 381 Email: y.khambia@tue.nl --0022152d80995ce03604a5effe15--