db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Derby In-Memory DB is not using any available indexes
Date Tue, 17 Dec 2013 12:47:45 GMT
Lasantha Siriwardana <lasantha.siriwardana@gmail.com> writes:

> Hi All,
> I've setup an derby in-memory db using derby distribution
> Below are the configurations;
> Max Heap Size - 3GB
> Page Cache Size - 10000
> I stored nearly one million records in a table with around 50 columns
> and trying to retrieve the data. But the query takes ~10sec. When I
> check the explain plan, It's not used any index and the optimizer cost
> is very higher. Also the scan type was heap. Please help to resolve
> this issue and tuneup the query. Why doesn't derby in-memory use
> indexes?

Hi Lasantha,

It's hard to tell why the indexes were not used without more
information. For example:

- What do the tables involved in the query look like?
- Which indexes and constraints are defined on the tables?
- What does the query look like?
- Which plan is chosen?


Knut Anders

View raw message