Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EBC799C2B for ; Tue, 1 May 2012 14:23:04 +0000 (UTC) Received: (qmail 60461 invoked by uid 500); 1 May 2012 14:23:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 60414 invoked by uid 500); 1 May 2012 14:23:04 -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 60399 invoked by uid 99); 1 May 2012 14:23:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2012 14:23:03 +0000 X-ASF-Spam-Status: No, hits=-4.6 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS,SUBJ_OBFU_PUNCT_FEW,SUBJ_OBFU_PUNCT_MANY,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rick.hillegas@oracle.com designates 148.87.113.117 as permitted sender) Received: from [148.87.113.117] (HELO rcsinet15.oracle.com) (148.87.113.117) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2012 14:22:54 +0000 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q41EMXUS004275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 1 May 2012 14:22:33 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q41EMWlP004242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 1 May 2012 14:22:32 GMT Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q41EMWsC017146 for ; Tue, 1 May 2012 09:22:32 -0500 Received: from dhcp-rmdc-twvpn-1-vpnpool-10-159-15-235.vpn.oracle.com (/10.159.15.235) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 May 2012 07:22:32 -0700 Message-ID: <4F9FF1A1.7060403@oracle.com> Date: Tue, 01 May 2012 07:22:25 -0700 From: Rick Hillegas User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: "derby-dev@db.apache.org" Subject: puzzling command options for SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE() Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Virus-Checked: Checked by ClamAV on apache.org According to the Derby Reference Guide, SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE() is supposed to return file space to the operating system if you invoke it with the trailing TRUNCATE_END argument set to 1. I am puzzled by the behavior I am seeing. I am looking at the repro for DERBY-5234. The heap conglomerate of a (soon to be) large table starts out as 8192 bytes long. Over time, the heap conglomerate grows to be 42672128 bytes long. Then all of the rows are deleted from the table and it is compressed with the following call: CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE( 'APP', 'OPERATIONS', 0, 0, 1 ) The heap conglomerate shrinks a little, down to 41857024. The Reference Guide suggests that this way of invoking SYSCS_INPLACE_COMPRESS_TABLE() might not actually do much. Here's what the Reference Guide says: "To return the empty free space at the end of the same table, the following call will run much quicker than running all options but will likely return much less space." In this situation, that's an understatement. In this situation, the meaning of the call seems to be "Run fast but don't do what I want." How is the user supposed to figure out which compression options should be turned on? Should we recommend that all options should always be turned on? Why would anyone want to run fast but not achieve much? Thanks, -Rick