Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 78808 invoked from network); 31 Mar 2006 18:11:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Mar 2006 18:11:42 -0000 Received: (qmail 69835 invoked by uid 500); 31 Mar 2006 18:11:41 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 69807 invoked by uid 500); 31 Mar 2006 18:11:41 -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: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 69798 invoked by uid 99); 31 Mar 2006 18:11:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2006 10:11:41 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_SORBS_WEB,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of manjula.kutty@gmail.com designates 64.233.184.232 as permitted sender) Received: from [64.233.184.232] (HELO wproxy.gmail.com) (64.233.184.232) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2006 10:11:40 -0800 Received: by wproxy.gmail.com with SMTP id i11so1036075wra for ; Fri, 31 Mar 2006 10:11:19 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=bfXuGWOS0/rJDu2/WbTh5tJt004YR6RstMyyeVdPy1qOt48p6RcnrYvqJYUvZCt+zIMDYE700H11EXi6E1BuXYsNseOsQN9He2+7ONjdGrRTi7GKAqAHFSh40qGkMZbjaXWK6cVH6vYgG5oqNNG07KHCfTDOKTZDxCpnmw+Uhxo= Received: by 10.54.103.11 with SMTP id a11mr632085wrc; Fri, 31 Mar 2006 10:11:19 -0800 (PST) Received: from ?9.72.133.58? ( [32.97.110.142]) by mx.gmail.com with ESMTP id g2sm234105wra.2006.03.31.10.11.19; Fri, 31 Mar 2006 10:11:19 -0800 (PST) Message-ID: <442D70C4.6010801@gmail.com> Date: Fri, 31 Mar 2006 10:11:16 -0800 From: Manjula G Kutty User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Does in-place compress really defragment? References: <0IWZ00J4WWUAYO@epost-mail1.sweden.sun.com> In-Reply-To: <0IWZ00J4WWUAYO@epost-mail1.sweden.sun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N �ystein Gr�vlen wrote: >I tried an experiment with on-line compress and it seems like no space >is freed unless I delete records at the end of the heap: > >1. Deleted every third record of a table >2. Inline compress with purge&defragment. File size did not change >3. Deleted every second of the remaining records >4. Inline compress with purge&defragment. File size did not change >5. Deleted the last third of the remaining records >6. Inline compress with purge&defragment. File size reduced by 1/3. >7. Deleted first half of the remaining records >8. Inline compress with purge&defragment. File size did not change > >Is this how it is supposed to be? I would have thought that each >compress would defragment the table and free space, but it seems like >only empty space at the end of a table is freed. Trace of what I did >below. (There are 1536 records in t. The records have primary keys >in range [0,1535] and was inserted in sorted order on primary key. >For all records j==mod(i,3).) > >-- >�ystein > >ij> create table t1 (i integer primary key, j integer, c varchar(300)); >0 rows inserted/updated/deleted >ij> insert into t1 select * from t; >1536 rows inserted/updated/deleted >ij> delete from t1 where j=1; >512 rows inserted/updated/deleted >ij> CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP', 'T1', 1, 1, 1); >0 rows inserted/updated/deleted >ij> delete from t1 where j=2; >512 rows inserted/updated/deleted >ij> CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP', 'T1', 1, 1, 1); >0 rows inserted/updated/deleted >ij> delete from t1 where i > 1024; >170 rows inserted/updated/deleted >ij> CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP', 'T1', 1, 1, 1); >0 rows inserted/updated/deleted >ij> delete from t1 where i < 512; >171 rows inserted/updated/deleted >ij> CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP', 'T1', 1, 1, 1); >0 rows inserted/updated/deleted >ij> > > > > Hi, I have used inplace compression in my test , which is a java program,. I called inpleace compression every one hour intervel and I'm deleting rows randomly. So I'm sure that they are not getting deleted from the bottom of the table. I 'm seeing notable increase in the free space after using inplace compression. Thanks Manjula