Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 17934 invoked from network); 15 Jun 2010 00:21:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 00:21:35 -0000 Received: (qmail 83618 invoked by uid 500); 15 Jun 2010 00:21:35 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 83565 invoked by uid 500); 15 Jun 2010 00:21:34 -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 83558 invoked by uid 99); 15 Jun 2010 00:21:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 00:21:34 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.18.6.24] (HELO gmp-eb-inf-2.sun.com) (192.18.6.24) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 00:21:25 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged)) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o5F0L2x9008199 for ; Tue, 15 Jun 2010 00:21:02 GMT MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) id <0L4100K004PG2T00@fe-emea-09.sun.com> for derby-user@db.apache.org; Tue, 15 Jun 2010 01:20:47 +0100 (BST) Received: from khepri23.norway.sun.com ([unknown] [129.159.112.235]) by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) with ESMTPSA id <0L4100B764YMSQ60@fe-emea-09.sun.com> for derby-user@db.apache.org; Tue, 15 Jun 2010 01:20:47 +0100 (BST) Date: Tue, 15 Jun 2010 02:20:46 +0200 From: Dag.Wanvik@Sun.COM (Dag H. Wanvik) Subject: Re: query works on 10.2, feezes with high CPU on 10.3 and above In-reply-to: <4C12B71F.9080601@syamsoftware.com> Sender: Dag.Wanvik@Sun.COM To: Derby Discussion Message-id: References: <4C12B71F.9080601@syamsoftware.com> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (usg-unix-v) X-Virus-Checked: Checked by ClamAV on apache.org Christopher Chisholm writes: > I have recently upgraded to a derby 10.5.3.0. This same query no > longer completes. Instead, it seems the CPU usage of the process that > runs the query shoots up to 50-80%, and never completes (i've left it > for hours). Any ideas why? It could be that the optimizer has changed and is now picking a bad query plan, so the query takes a very long time to complete. If you can run with -Dderby.language.logQueryPlan=true and attach the query plans you see (in derby.log) for 10.2 and 10.6, we could compare and see what changed if anything. Try to make the slow query complete by letting run overnight ;-) See also http://wiki.apache.org/db-derby/PerformanceDiagnosisTips If you can produce a sample database which shows the slowdown and enclose that to a Derby JIRA issue, that would be even better and allow us to speed ut detection of the issue. For how to file a Derby bug report, cf. http://db.apache.org/derby/DerbyBugGuidelines.html Thanks, Dag