Lasantha Siriwardana <[email protected]> writes: > Hi All, > > I've setup an derby in-memory db using derby distribution 10.10.1.1. > 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? Thanks, -- Knut Anders
