Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 94084 invoked from network); 8 Feb 2010 14:47:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2010 14:47:13 -0000 Received: (qmail 37816 invoked by uid 500); 8 Feb 2010 14:47:12 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 37772 invoked by uid 500); 8 Feb 2010 14:47:12 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 37379 invoked by uid 99); 8 Feb 2010 14:47:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 14:47:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ronchalant@gmail.com designates 209.85.221.190 as permitted sender) Received: from [209.85.221.190] (HELO mail-qy0-f190.google.com) (209.85.221.190) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 14:47:02 +0000 Received: by qyk28 with SMTP id 28so3096819qyk.25 for ; Mon, 08 Feb 2010 06:46:41 -0800 (PST) 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=ch3NGAfbghrLM6ALBSMhrYqA4iK0VbV+BbcBYEPSh4M=; b=Q5/UqkV3Pg3wH1yjM+fGSqJKLrJD6AMX3Mf8m+bVeywgopi7NsLRok6o0lYOqZ7L3R qug+PY9kIRJoqe7lkTC2mXGUgDLCPxbbOLWNRjvuvc53KF7NWuepKOffJpjDpbi55w2q /1ieRAErpDaUyF50o1J/u42HsbvywYbdJoXhY= 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=V2iSBj5z9OZ58KjrJ6j1oNS6smHYcMZ8pDvArkGrXjz/wR7FDVFAOZyGOx4Vidmnxn 3/eeEdkpWzGsKhHltNVhYzWRHVSlUdfUEckwra/TSQraJrVfvTPXrqmKIGbyv4SJsnpv fmlakSCVXa+lsncLPbrM8bK2eWndl5l6gjqlk= Received: by 10.224.23.145 with SMTP id r17mr2471566qab.119.1265640401036; Mon, 08 Feb 2010 06:46:41 -0800 (PST) Received: from lodi-dodi-3.home ([173.62.203.96]) by mx.google.com with ESMTPS id 6sm9810426qwd.16.2010.02.08.06.46.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 08 Feb 2010 06:46:40 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: OutOfMemoryErrors on group by select From: Ronald Rudy In-Reply-To: <4d2670741002080637u4483e31scd1065ce32c78904@mail.gmail.com> Date: Mon, 8 Feb 2010 09:46:36 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <623833E5-84DC-4FFF-AED2-91978097EB4E@gmail.com> References: <4d2670741002080621o3409f084t288587d3088738aa@mail.gmail.com> <4d2670741002080637u4483e31scd1065ce32c78904@mail.gmail.com> To: "Derby Discussion" X-Mailer: Apple Mail (2.1077) X-Virus-Checked: Checked by ClamAV on apache.org On its own the query seems to work ok, it seems that under load it = pushes it over the line. My memory usage goes to ~100MB right away just = executing the query. Repeated executions of the query don't seem to = move the needle much though. =20 It's not really tenable right now to move to 10.5, though I'd like to = during our next major revision (in the next month) so I can take = advantage of the OFFSET capabilities. =20 I guess I'm more looking for general guidelines for managing memory = usage in Derby - are there page size settings or anything else I can = pass into Derby to force it to utilize less memory at the expense of = performance? I set the pageCacheSize at 2000, are there other params = that will help limit memory usage in Derby? Also, it seems in general that aggregate functionality (for example = sum() functions on group by's) is rather poor performing in Derby - is = there any way to improve this outside of indexing? When I did a = benchmark where in one implementation I straight iterated over the = results and aggregated my grouped results in simple in-memory Map = objects as compared against executing a Derby group by directly, the = results were identical - is there something I can do here? On Feb 8, 2010, at 9:37:59 AM, Peter Ondru=9Aka wrote: > Try creating a non-unique index on the column you group by. Have you > tried more recent Derby version if you can reproduce that there? >=20