db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald Rudy <ronchal...@gmail.com>
Subject Re: OutOfMemoryErrors on group by select
Date Mon, 08 Feb 2010 14:46:36 GMT
On its own the query seems to work ok, it seems that under load it pushes it over the line.
 My memory usage goes to ~100MB right away just executing the query.  Repeated executions
of the query don't seem to move the needle much though.  

It's not really tenable right now to move to 10.5, though I'd like to during our next major
revision (in the next month) so I can take advantage of the OFFSET capabilities.  

I guess I'm more looking for general guidelines for managing memory usage in Derby - are there
page size settings or anything else I can pass into Derby to force it to utilize less memory
at the expense of performance?  I set the pageCacheSize at 2000, are there other params that
will help limit memory usage in Derby?

Also, it seems in general that aggregate functionality (for example sum() functions on group
by's) is rather poor performing in Derby - is there any way to improve this outside of indexing?
 When I did a benchmark where in one implementation I straight iterated over the results and
aggregated my grouped results in simple in-memory Map objects as compared against executing
a Derby group by directly, the results were identical - is there something I can do here?

On Feb 8, 2010, at 9:37:59 AM, Peter Ondruška wrote:

> Try creating a non-unique index on the column you group by. Have you
> tried more recent Derby version if you can reproduce that there?

View raw message