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 F1BC34671 for ; Thu, 12 May 2011 00:37:46 +0000 (UTC) Received: (qmail 80808 invoked by uid 500); 12 May 2011 00:37:45 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80770 invoked by uid 500); 12 May 2011 00:37:45 -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 80762 invoked by uid 99); 12 May 2011 00:37:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2011 00:37:45 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,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 heshiming@gmail.com designates 209.85.215.180 as permitted sender) Received: from [209.85.215.180] (HELO mail-ey0-f180.google.com) (209.85.215.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2011 00:37:40 +0000 Received: by eyg24 with SMTP id 24so421197eyg.11 for ; Wed, 11 May 2011 17:37:18 -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=rlc48wLy19ZEs4bA75RNRNr/mUkzocSjEKfg7uFePfg=; b=sG1zj6ZnIpSt+MquDL7sdU12Sl2urYL9TfuJvCIrClIQoV72f0FMM09GP91v4+wvc8 EC2dE4t7uujTsORqFZ7Es0tYQZj25VGbq91UpAg/QV1POVf+oeL+TngDAiofM3Ult3dL Ngn5NgUsmP47npxvmNkit17WhtP/FnvSG36iM= 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=A9BkrEAGrvdQFYCH1vpGzrm0bbTe76v5q6TO6Pr9BBn4Fz2C9yrLRRhE8seX7hZs0z 3QxLTJ8GhHlfRIhcO/2K+2i4iD08FitFmInKLp6oV4nvQwRIxHpwjFmKzQYPlU+ozUDS WZhZtXCi7jxAC1nq/wMYqlESsoasBVOaBiSE4= MIME-Version: 1.0 Received: by 10.14.0.143 with SMTP id 15mr4410467eeb.190.1305160638613; Wed, 11 May 2011 17:37:18 -0700 (PDT) Received: by 10.14.37.140 with HTTP; Wed, 11 May 2011 17:37:18 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 May 2011 08:37:18 +0800 Message-ID: Subject: Re: Optimal counter implementation? From: He Shiming To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Wed, May 11, 2011 at 11:12 PM, Zachary Zolton wrote: > As long as your considering using another datastore, you should consider Redis. > > If you're just maintaining count statistics: > http://redis.io/commands/incr > Thanks. I'm considering CouchDB because I'm familiar with the document/map-reduce concept. I'm not sure how this counter data will be used in the future. So I tend to keep a raw log of it. Map-reduce will allow me to query about just any field. I used redis for session store, which is strictly a key-value pair. Redis' incr looks simple. But what if I would like to store raw log, with time, subject and target? And later on how do I manage to query by these fields? Sorry for off-topic. I'll redirect this question to the redis community. -- Best regards, He Shiming