db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PhilCope <phil1.c...@ge.com>
Subject Re: Thread Interruption in large Database
Date Mon, 16 Jun 2008 15:44:04 GMT



Knut Anders Hatlen wrote:
> 
> PhilCope <phil1.cope@ge.com> writes:
> 
>> I have a large cloudscape 5 database (over 5million records) and I have
>> found
>> that when a ResultsSet includes all or many of these records, the initial
>> call to ResultsSet.next() takes a very long (but finite) time (I would
>> estimate about 10-15mins) . I can (indeed have) arrange the code so that
>> this call occurs in a separate java thread which can be interrupted from
>> the
>> UI thread. BUT, as you may know, java threads that are set to as
>> interrupted
>> continue to execute until either application code or some "system" calls
>> actually check the interrupted state of the running thread.
>>
>> So, given this background info, my questions on Derby are 
>>
>> 1. Have any significant performance improvements been made such that, for
>> databases of this size, migrating from cloudscape to Derby would provide
>> a
>> significantly better response time ?
> 
> There have been many performance improvements in Derby over the last
> years, but it is hard to say if they help you without knowing more
> details. The best way to find it out is to download Derby and test it.
> 
>> 2. If not, are there any improvements to the responsiveness of the
>> timeconsuming call to .next() to the setting of the interrupted flag on
>> the
>> current thread in Derby ?
> 
> Statement.setQueryTimeout() has been implemented and can be used to
> prevent queries from taking too long.
> 
> -- 
> Knut Anders
> 
> 
I would not expect setQueryTimeout() to help me - my observation is that
executing the query doesn't take very long, it is the retrieval of the first
result via the next() call that takes the time. Or am I wrong ? 

-- 
View this message in context: http://www.nabble.com/Thread-Interruption-in-large-Database-tp17865036p17867174.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message