From derby-user-return-9404-apmail-db-derby-user-archive=db.apache.org@db.apache.org Mon Jun 16 14:45:45 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 91832 invoked from network); 16 Jun 2008 14:45:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jun 2008 14:45:44 -0000 Received: (qmail 44436 invoked by uid 500); 16 Jun 2008 14:45:45 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 44412 invoked by uid 500); 16 Jun 2008 14:45:45 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 44401 invoked by uid 99); 16 Jun 2008 14:45:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2008 07:45:45 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-inf-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2008 14:44:54 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe1.eu.sun.com [192.18.6.10]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m5GEj96f029056 for ; Mon, 16 Jun 2008 14:45:10 GMT Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K2K005018OLP300@fe-emea-09.sun.com> (original mail from Knut.Hatlen@Sun.COM) for derby-user@db.apache.org; Mon, 16 Jun 2008 15:45:09 +0100 (BST) Received: from localhost ([129.159.112.134]) by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K2K00MO88Z6VX40@fe-emea-09.sun.com> for derby-user@db.apache.org; Mon, 16 Jun 2008 15:45:07 +0100 (BST) Date: Mon, 16 Jun 2008 16:45:06 +0200 From: Knut Anders Hatlen Subject: Re: Thread Interruption in large Database In-reply-to: <17865036.post@talk.nabble.com> Sender: Knut.Hatlen@Sun.COM To: Derby Discussion Message-id: Organization: Sun Microsystems MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: <17865036.post@talk.nabble.com> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (usg-unix-v) X-Virus-Checked: Checked by ClamAV on apache.org PhilCope 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