db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bergquist, Brett" <BBergqu...@canoga.com>
Subject RE: Performance problem with derby
Date Tue, 30 Aug 2011 17:10:28 GMT
Take a look at using the runtime statistics to retrieve the query plan and make sure your index
is being used. 

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='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 approximatively
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-with-derby-tp32364853p32364853.html
Sent from the Apache Derby Developers mailing list archive at Nabble.com.




Mime
View raw message