Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 23403 invoked from network); 7 Mar 2007 17:31:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2007 17:31:56 -0000 Received: (qmail 96276 invoked by uid 500); 7 Mar 2007 17:32:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 96248 invoked by uid 500); 7 Mar 2007 17:32: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 96239 invoked by uid 99); 7 Mar 2007 17:32:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 09:32:04 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [32.97.182.146] (HELO e6.ny.us.ibm.com) (32.97.182.146) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 09:31:51 -0800 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e6.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l27HWDI9027427 for ; Wed, 7 Mar 2007 12:32:13 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l27HVR1c029256 for ; Wed, 7 Mar 2007 12:31:27 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l27HVRC5015633 for ; Wed, 7 Mar 2007 12:31:27 -0500 Received: from [127.0.0.1] (IBM-IKEJ04B1IMA.usca.ibm.com [9.72.133.187]) by d01av03.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l27HVOlE015473 for ; Wed, 7 Mar 2007 12:31:26 -0500 Message-ID: <45EEF6E1.4020306@sbcglobal.net> Date: Wed, 07 Mar 2007 09:31:13 -0800 From: Mike Matrigali Reply-To: mikem_app@sbcglobal.net User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: "dynamic_info" in the access layer References: <45EE9221.9040703@Sun.com> In-Reply-To: <45EE9221.9040703@Sun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I believe this is still actively used. It's main purpose is to save memory allocation/deallocation in statements that are executed more than once. I believe the plan was to make more extensive use of it, but as you have seen it is limited. The problem is that the caller of store is the one that is set up to save memory across executions of a statement, so it needs to own this memory. But the actual objects are private to store, thus why the interface looks strange, it is set up so that in the future store if necessary can put more or less into this private space. While there may be few in code number, I believe that openCompiledScan is the way most user executed query's get run in the store. The savings here is that select executed 1 million times can only allocate a buffer once rather than 1 million times. It is trying to do the same thing for store working memory as is done in the language layer for query plan dynamic memory. Kristian Waagan wrote: > Hello, > > This information in this mail is rather incomplete. > However, I have been looking at the access layer lately, trying to get > an overview over the code. I do not quite understand the use of > "dynamic_info", or more precisely if it is still used a lot. > > dynamic_info is an object implementing the interface > DynamicCompiledOpenConglomInfo. The interface has no methods or fields. > The only implementing class I have found, is > OpenConglomerateScratchSpace. The methods in this class are being > called, but I have not checked out from where. > > I have found only two casts from the interface to the implementing > class. In both cases a new instance of OpenConglomerateScratchSpace will > be created of the passed in dynamic_info is null. > In both cases, the OpenConglomerateScratchSpace is assigned to > this.runtime_mem (in OpenConglomerate and in OpenBTree). At least some > methods in OpenConglomerateScratchSpace is called by getting the > reference stored in runtime_mem, which may or may not come from the > dynamic_info variable. > > > My question is, will the passed in dynamic_info ever be non-null? > Is this a left-over from earlier days, or is the usage still a crucial > part of the access layer? > > If not, the passing of this variable clutters the code. I can observe > that a null is passed explicitly in very many places where methods > accept a DynamicCompiledOpenConglomInfo reference. > I plan to check this at runtime, but if anyone already has the answer, > it would be convenient :) > > > > thanks,