Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 18433 invoked from network); 22 Jul 2010 04:11:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Jul 2010 04:11:31 -0000 Received: (qmail 89057 invoked by uid 500); 22 Jul 2010 04:11:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 88685 invoked by uid 500); 22 Jul 2010 04:11:26 -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 88676 invoked by uid 99); 22 Jul 2010 04:11:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jul 2010 04:11:25 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=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 jchris@gmail.com designates 74.125.83.180 as permitted sender) Received: from [74.125.83.180] (HELO mail-pv0-f180.google.com) (74.125.83.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jul 2010 04:11:16 +0000 Received: by pvg12 with SMTP id 12so6365747pvg.11 for ; Wed, 21 Jul 2010 21:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=cmsXS1uhYvN38Usit4Gb2TyNGavL+79WLfz5WJ9Bcr8=; b=n6stA+K6qIrSdtv37kxxtzd7wtFYbvX6wPyfJwH5XoiqfSVnDggx9uo7abPdk7Ages DFoSB+u9F7Sj4g2KzqMHQKkO2iVjC9nHgGAs38lv6gHrt36acO5U4YgYpSTpG6G10q7K XwPYOzm1s4ejIdzVi3l0TzSHajbOSctEfoe74= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=R3HJJATirr5LgG4in7dpYlpDbn0yxwDd6mxTJ7wHCv55ot1s9nmrUlT3OM4gmzjGjC fjAQOA5h4C7Eg7x9v8PmLj25SpvSWUD67bg9wItdh0CrX4hU0nL74MIZJIX+SdAdt8Rz iRUjAZyUZcoWOVsBeUfs+tYuZdmg7RlgUNmss= Received: by 10.142.164.3 with SMTP id m3mr1498164wfe.293.1279771854692; Wed, 21 Jul 2010 21:10:54 -0700 (PDT) Received: from [192.168.1.102] (c-98-248-172-14.hsd1.ca.comcast.net [98.248.172.14]) by mx.google.com with ESMTPS id b11sm20474523rvf.22.2010.07.21.21.10.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Jul 2010 21:10:53 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: reduce_overflow_error From: J Chris Anderson In-Reply-To: <001AFFD2-5DCE-4E50-9F8B-37EF58C0C908@mymedify.com> Date: Wed, 21 Jul 2010 21:10:41 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <2F1AF229-33A0-4945-8BA2-46A8E617EE49@gmail.com> <001AFFD2-5DCE-4E50-9F8B-37EF58C0C908@mymedify.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org On Jul 21, 2010, at 4:59 PM, Talib Sharif wrote: > Yup, thats what i discovered. >=20 > Basically i had >=20 > var val =3D parseInt(doc.field1.attr1) > emit(doc._id, val) >=20 > and doesnt necessaryily mean that it will will be 0 or something. >=20 > i had to do >=20 > var val =3D parseInt(doc.field1.attr1) > if (val) > emit(doc._id, val) >=20 > Thanks, > Talib >=20 Also it is worth noting that equivalent to this reduce function: function(ks, vs, rr) { return sum(vs); } is the plain text: _sum And it will be run in Erlang and be much much faster especially for = group queries. There is also _count if you would always be emitting the value 1 from = your map and would like to count the # of rows. When you do this you can = emit any old thing, and the value will be ignored, just the # of rows = counted. Chris >=20 > On Jul 21, 2010, at 4:37 PM, J Chris Anderson wrote: >=20 >>=20 >> On Jul 21, 2010, at 3:08 PM, Talib Sharif wrote: >>=20 >>> I am getting the following error when requesting a view. My Db has = about >>> 100000 documents. And i have about 10 views with either having no = reduce >>> function or a reduce function with 'return sum(values)' as the = return value. >>>=20 >>> I tried the exact same views on a 2000 documents DB and i don't get = this >>> error. Am i hitting some wall in terms of size? Whats the best way = to debug >>> this? >>>=20 >>> {"error":"reduce_overflow_error","reason":"Reduce output must shrink >>> more rapidly: Current output: ' >>>=20 >>=20 >> Are the values scalar numbers before you sum them? >>=20 >> You can run log(foo) to log to the couch.log from the view function. >>=20 >> Chris >>=20 >>>=20 >>> Thanks, >>>=20 >>> Talib >>=20 >=20