Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F32D8F8D for ; Tue, 30 Aug 2011 17:14:26 +0000 (UTC) Received: (qmail 42067 invoked by uid 500); 30 Aug 2011 17:14:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 41978 invoked by uid 500); 30 Aug 2011 17:14:25 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 41971 invoked by uid 99); 30 Aug 2011 17:14:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 17:14:25 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [65.55.88.11] (HELO TX2EHSOBE001.bigfish.com) (65.55.88.11) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 17:14:17 +0000 Received: from mail191-tx2-R.bigfish.com (10.9.14.249) by TX2EHSOBE001.bigfish.com (10.9.40.21) with Microsoft SMTP Server id 14.1.225.22; Tue, 30 Aug 2011 17:13:56 +0000 Received: from mail191-tx2 (localhost.localdomain [127.0.0.1]) by mail191-tx2-R.bigfish.com (Postfix) with ESMTP id 4B8F21848635 for ; Tue, 30 Aug 2011 17:13:56 +0000 (UTC) X-SpamScore: -13 X-BigFish: VPS-13(zz9371K1418Mzz1202hzz5eeeM8275bh8275dhz2dh2a8h668h839h944h) X-Forefront-Antispam-Report: CIP:74.62.37.82;KIP:(null);UIP:(null);IPVD:NLI;H:CPHUB1.canoga.com;RD:rrcs-74-62-37-82.west.biz.rr.com;EFVD:NLI X-FB-SS: 13, Received: from mail191-tx2 (localhost.localdomain [127.0.0.1]) by mail191-tx2 (MessageSwitch) id 1314724395818584_1976; Tue, 30 Aug 2011 17:13:15 +0000 (UTC) Received: from TX2EHSMHS036.bigfish.com (unknown [10.9.14.241]) by mail191-tx2.bigfish.com (Postfix) with ESMTP id C292DB804C for ; Tue, 30 Aug 2011 17:13:15 +0000 (UTC) Received: from CPHUB1.canoga.com (74.62.37.82) by TX2EHSMHS036.bigfish.com (10.9.99.136) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 30 Aug 2011 17:13:15 +0000 Received: from vserver1.canoga.com ([169.254.2.6]) by CPHUB1.canoga.com ([172.16.1.93]) with mapi; Tue, 30 Aug 2011 10:14:13 -0700 From: "Bergquist, Brett" To: "derby-dev@db.apache.org" Date: Tue, 30 Aug 2011 10:10:28 -0700 Subject: RE: Performance problem with derby Thread-Topic: Performance problem with derby Thread-Index: AcxnIW1vGf0E2l71QmmHi7Z6EfLWJgAFkmwx Message-ID: <97EB699F861AD841B5908C7CA9C9565601607A6B0E5A@VSERVER1.canoga.com> References: <32364853.post@talk.nabble.com> In-Reply-To: <32364853.post@talk.nabble.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US x-tm-as-product-ver: SMEX-8.0.0.1307-6.500.1024-18354.005 x-tm-as-result: No--40.564900-0.000000-31 x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: canoga.com X-Virus-Checked: Checked by ClamAV on apache.org Take a look at using the runtime statistics to retrieve the query plan and = make sure your index is being used.=20 http://db.apache.org/derby/docs/10.8/tuning/tuningderby.pdf I think that maybe the index is not being used for the ordering and a disk = based sort is being done. ________________________________________ From: mogoye [sylvain.roulet@eloquant.com] Sent: Tuesday, August 30, 2011 10:29 AM To: derby-dev@db.apache.org Subject: Performance problem with derby We are experiencing some performance problem with a Derby DB. To make short we have a table with the following columns : clientId | callRef | callStart | callEnd | contact | .... and some others The primary key is : (clientId, callRef). I'm trying the following request : SELECT * FROM CALLCDRACD WHERE clientId=3D'xxxx' ORDER BY CALLSTART OFFSET = 10 ROWS FETCH NEXT 20 ROWS ONLY The request is executed during 15 sec with this table containing 460 000 entries (seems a lot of time). I've added the following index : CREATE INDEX IND_CCA_CALLSTART ON APP.CALLCDRACD(CLIENTID,CALLSTART) but now the request took approximativel= y the same time to be processed... My index seems to have no effects. We made and other test using mySQL and the same DB configuration, mySQL returns the results within 200ms Does someone have any explanation about this 15 sec required to process the request on a derby DB. -- View this message in context: http://old.nabble.com/Performance-problem-wit= h-derby-tp32364853p32364853.html Sent from the Apache Derby Developers mailing list archive at Nabble.com.