Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 98276 invoked from network); 2 Jul 2007 13:14:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2007 13:14:28 -0000 Received: (qmail 51882 invoked by uid 500); 2 Jul 2007 13:14:29 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 51853 invoked by uid 500); 2 Jul 2007 13:14:29 -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 51829 invoked by uid 99); 2 Jul 2007 13:14:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 06:14:29 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 06:14:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BC2567141EA for ; Mon, 2 Jul 2007 06:14:04 -0700 (PDT) Message-ID: <4674036.1183382044767.JavaMail.jira@brutus> Date: Mon, 2 Jul 2007 06:14:04 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2878) Scan protection handle could be cached in BasePage In-Reply-To: <28204172.1182953126178.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-2878: -------------------------------------- Derby Info: [Patch Available] > Scan protection handle could be cached in BasePage > -------------------------------------------------- > > Key: DERBY-2878 > URL: https://issues.apache.org/jira/browse/DERBY-2878 > Project: Derby > Issue Type: Improvement > Components: Performance, Store > Affects Versions: 10.4.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: derby-2878-1.diff, derby-2878-1.stat, derby-2878-1b.diff, derby-2878-2.diff > > > Each time a leaf node in a B-tree is visited in an index scan, a scan protection row is locked and unlocked. Both the lock operation and the unlock operation will allocate a new RecordId object representing the scan protection row (the unlock operation additionally allocates a PageKey object for the RecordId). Since the scan protection handle created will be identical (seen from equals()) each time it is created for a page, it would make sense to cache it in BasePage. Then we only need to allocate the protection handle for a page once for as long as it stays in the page cache. This would save three object allocations per single-record lookup via index. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.