Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 37023 invoked from network); 16 Aug 2005 16:50:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Aug 2005 16:50:14 -0000 Received: (qmail 62985 invoked by uid 500); 16 Aug 2005 16:50:13 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 62937 invoked by uid 500); 16 Aug 2005 16:50:12 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 62924 invoked by uid 99); 16 Aug 2005 16:50:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2005 09:50:12 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,SPF_HELO_FAIL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.182.141] (HELO e1.ny.us.ibm.com) (32.97.182.141) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2005 09:50:32 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j7GGoAjk013138 for ; Tue, 16 Aug 2005 12:50:10 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j7GGoAYp283006 for ; Tue, 16 Aug 2005 12:50:10 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j7GGoAWr017271 for ; Tue, 16 Aug 2005 12:50:10 -0400 Received: from [9.72.134.65] (ws420-1.usca.ibm.com [9.72.134.65]) by d01av03.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j7GGo9Mb017231 for ; Tue, 16 Aug 2005 12:50:09 -0400 Message-ID: <43021907.3060006@sbcglobal.net> Date: Tue, 16 Aug 2005 09:49:11 -0700 From: Mike Matrigali User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: [jira] Created: (DERBY-510) DERBY-132 resolved ? Table not automatically compressed References: <1422164751.1124196655093.JavaMail.jira@ajax.apache.org> In-Reply-To: <1422164751.1124196655093.JavaMail.jira@ajax.apache.org> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Full compression of derby tables is not done automatically, I am looking for input on how to schedule such an operation. An operation like this is going to have a large cpu, i/o, and possible temporary disk space impact on the rest of the server. As a zero admin db I think we should figure out some way to do this automatically, but I think there are a number of applications which would not be happy with such a performance impact not under their control. My initial thoughts are to pick a default time frame, say once every 30 days to check for table level events like compression and statistics generation and then execute the operations at low priority. Also add some sort of parameter so that applications could disable the automatic background jobs. Note that derby does automatically reclaim space from deletes for subsequent inserts, but the granularity currently is at a page level. So deleting every 3rd or 5th row is the worst case behavior. The page level decision was a tradeoff as reclaiming the space is time consuming so did not want to schedule to work on a row by row basis. Currently we schedule the work when all the rows on a page are marked deleted. Volker Edelmann (JIRA) wrote: > DERBY-132 resolved ? Table not automatically compressed > -------------------------------------------------------- > > Key: DERBY-510 > URL: http://issues.apache.org/jira/browse/DERBY-510 > Project: Derby > Type: Bug > Versions: 10.1.1.0 > Environment: JDK 1.4.2, JDK 1.5.0 > Windows XP > Reporter: Volker Edelmann > > > I tried a test-program that repeatedly inserts a bunch of data into 1 table and repeatedly deletes a bunch of data. > > // table is not empty when test-program starts > derby.executeSelect("select count(*) c from rclvalues"); > > TestQueries.executeBulkInsertAnalyst(derby.getConnection(), 2000000); // insert 2.000.000 rows > derby.executeDelete("delete from rclvalues where MOD(id, 3) = 0"); > TestQueries.executeBulkInsertAnalyst(derby.getConnection(), 1000000); > derby.executeDelete("delete from rclvalues where MOD(id, 5) = 0"); > > derby.executeSelect("select count(*) c from rclvalues"); > > At the end of the operation, the table contains approximately the same number of rows. But the size of the database has grown from > 581 MB to 1.22 GB. From the description of item DERBY-132, I hoped that Derby does the compression now ( version 10.1.X.X.). > >