Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 44513 invoked from network); 8 Sep 2010 15:46:24 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Sep 2010 15:46:24 -0000 Received: (qmail 35539 invoked by uid 500); 8 Sep 2010 15:46:24 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 35403 invoked by uid 500); 8 Sep 2010 15:46:21 -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 35396 invoked by uid 99); 8 Sep 2010 15:46:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Sep 2010 15:46:21 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [148.87.113.121] (HELO rcsinet10.oracle.com) (148.87.113.121) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Sep 2010 15:46:13 +0000 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o88Fjocu020184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Sep 2010 15:45:52 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o88FjoId002401; Wed, 8 Sep 2010 15:45:50 GMT Received: from abhmt006.oracle.com by acsmt353.oracle.com with ESMTP id 575875661283960737; Wed, 08 Sep 2010 08:45:37 -0700 Received: from localhost (/129.150.120.177) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 08 Sep 2010 08:45:36 -0700 From: Knut Anders Hatlen To: "Derby Discussion" Cc: paul_t100@fastmail.fm Subject: Re: Reclaiming space from Derby References: <4C876A7E.2080309@fastmail.fm> <4C87A951.4050907@fastmail.fm> Date: Wed, 08 Sep 2010 17:45:31 +0200 In-Reply-To: <4C87A951.4050907@fastmail.fm> (Paul Taylor's message of "Wed, 08 Sep 2010 16:18:41 +0100") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain Paul Taylor writes: > Knut Anders Hatlen wrote: >> Paul Taylor writes: >> >> >>> HI, I use derby in embedded mode, I let the user specify a maxmium >>> size for the derby database files, my program monitors this and if it >>> goes over the size I use SQL to delete records that are no longer >>> necessary in the hope of shrinking the database files size, but it >>> doesn't, how can I force Derby to shrink back down ? >>> >> >> Hi Paul, >> >> The database files won't shrink unless you compress the tables. >> >> http://db.apache.org/derby/docs/10.6/ref/rrefaltertablecompress.html >> http://db.apache.org/derby/docs/10.6/ref/rrefproceduresinplacecompress.html >> >> Hope this helps, >> >> > Thanks guys that does help, the only problem is that it takes an > exclusive lock on the table and I wanted to run it in the background > as and when required when other tasks might be going ahead. But can > probaly work round this. In the issue tracker there's a request for allowing more concurrent activity while compressing a table, but there hasn't been any work on it yet. https://issues.apache.org/jira/browse/DERBY-3974 -- Knut Anders